diff options
author | Junio C Hamano <junkio@cox.net> | 2006-11-02 00:02:11 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-11-04 12:18:12 -0800 |
commit | 2f3f8b218abae6fc0574d0e22d3614fc0f5e983d (patch) | |
tree | 6a0361bf80af3aca302bbf5473b723745d4ba5d5 /diffcore-rename.c | |
parent | 20239bae943733d766e6475cf0916966c868246b (diff) | |
download | git-2f3f8b218abae6fc0574d0e22d3614fc0f5e983d.tar.gz |
git-pickaxe: rename detection optimization
The idea is that we are interested in renaming into only one path, so
we do not care about renames that happen elsewhere.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r-- | diffcore-rename.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c index ef239012b6..57a74b6bb8 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -256,11 +256,15 @@ void diffcore_rename(struct diff_options *options) for (i = 0; i < q->nr; i++) { struct diff_filepair *p = q->queue[i]; - if (!DIFF_FILE_VALID(p->one)) + if (!DIFF_FILE_VALID(p->one)) { if (!DIFF_FILE_VALID(p->two)) continue; /* unmerged */ + else if (options->single_follow && + strcmp(options->single_follow, p->two->path)) + continue; /* not interested */ else locate_rename_dst(p->two, 1); + } else if (!DIFF_FILE_VALID(p->two)) { /* If the source is a broken "delete", and * they did not really want to get broken, |