|
|
|
@ -408,7 +408,7 @@ static struct origin *find_origin(struct scoreboard *sb,
@@ -408,7 +408,7 @@ static struct origin *find_origin(struct scoreboard *sb,
|
|
|
|
|
paths[0] = origin->path; |
|
|
|
|
paths[1] = NULL; |
|
|
|
|
|
|
|
|
|
diff_tree_setup_paths(paths, &diff_opts); |
|
|
|
|
init_pathspec(&diff_opts.pathspec, paths); |
|
|
|
|
diff_setup_done(&diff_opts); |
|
|
|
|
|
|
|
|
|
if (is_null_sha1(origin->commit->object.sha1)) |
|
|
|
@ -458,7 +458,7 @@ static struct origin *find_origin(struct scoreboard *sb,
@@ -458,7 +458,7 @@ static struct origin *find_origin(struct scoreboard *sb,
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
diff_flush(&diff_opts); |
|
|
|
|
diff_tree_release_paths(&diff_opts); |
|
|
|
|
free_pathspec(&diff_opts.pathspec); |
|
|
|
|
if (porigin) { |
|
|
|
|
/* |
|
|
|
|
* Create a freestanding copy that is not part of |
|
|
|
@ -494,7 +494,7 @@ static struct origin *find_rename(struct scoreboard *sb,
@@ -494,7 +494,7 @@ static struct origin *find_rename(struct scoreboard *sb,
|
|
|
|
|
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT; |
|
|
|
|
diff_opts.single_follow = origin->path; |
|
|
|
|
paths[0] = NULL; |
|
|
|
|
diff_tree_setup_paths(paths, &diff_opts); |
|
|
|
|
init_pathspec(&diff_opts.pathspec, paths); |
|
|
|
|
diff_setup_done(&diff_opts); |
|
|
|
|
|
|
|
|
|
if (is_null_sha1(origin->commit->object.sha1)) |
|
|
|
@ -516,7 +516,7 @@ static struct origin *find_rename(struct scoreboard *sb,
@@ -516,7 +516,7 @@ static struct origin *find_rename(struct scoreboard *sb,
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
diff_flush(&diff_opts); |
|
|
|
|
diff_tree_release_paths(&diff_opts); |
|
|
|
|
free_pathspec(&diff_opts.pathspec); |
|
|
|
|
return porigin; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1079,7 +1079,7 @@ static int find_copy_in_parent(struct scoreboard *sb,
@@ -1079,7 +1079,7 @@ static int find_copy_in_parent(struct scoreboard *sb,
|
|
|
|
|
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT; |
|
|
|
|
|
|
|
|
|
paths[0] = NULL; |
|
|
|
|
diff_tree_setup_paths(paths, &diff_opts); |
|
|
|
|
init_pathspec(&diff_opts.pathspec, paths); |
|
|
|
|
diff_setup_done(&diff_opts); |
|
|
|
|
|
|
|
|
|
/* Try "find copies harder" on new path if requested; |
|
|
|
@ -1162,7 +1162,7 @@ static int find_copy_in_parent(struct scoreboard *sb,
@@ -1162,7 +1162,7 @@ static int find_copy_in_parent(struct scoreboard *sb,
|
|
|
|
|
} |
|
|
|
|
reset_scanned_flag(sb); |
|
|
|
|
diff_flush(&diff_opts); |
|
|
|
|
diff_tree_release_paths(&diff_opts); |
|
|
|
|
free_pathspec(&diff_opts.pathspec); |
|
|
|
|
return retval; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|