summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 20239ba)
raw | patch | inline | side by side (parent: 20239ba)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 2 Nov 2006 08:02:11 +0000 (00:02 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 4 Nov 2006 20:18:12 +0000 (12:18 -0800) |
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>
we do not care about renames that happen elsewhere.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pickaxe.c | patch | blob | history | |
diff.h | patch | blob | history | |
diffcore-rename.c | patch | blob | history |
diff --git a/builtin-pickaxe.c b/builtin-pickaxe.c
index f6e861a26dbda100ea6aeb884ad62c75872a8e76..97b3732419b248eba72880972e7a609e63fbcf5f 100644 (file)
--- a/builtin-pickaxe.c
+++ b/builtin-pickaxe.c
diff_opts.recursive = 1;
diff_opts.detect_rename = DIFF_DETECT_RENAME;
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
+ diff_opts.single_follow = origin->path;
paths[0] = NULL;
diff_tree_setup_paths(paths, &diff_opts);
if (diff_setup_done(&diff_opts) < 0)
index ce3058e437d5f0142be0746a3e50a3c32045eecb..6fda92a7b5e69cbedfe5b13e9c4e7fba54a7ed7f 100644 (file)
--- a/diff.h
+++ b/diff.h
const char *filter;
const char *orderfile;
const char *pickaxe;
+ const char *single_follow;
unsigned recursive:1,
tree_in_recursive:1,
binary:1,
diff --git a/diffcore-rename.c b/diffcore-rename.c
index ef239012b65c901bba5eef598f62679fd288106e..57a74b6bb83e14af5f7336f397f79fbfcdc8b5f7 100644 (file)
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
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,