blame: move no_whole_file_rename flag to scoreboard
The no_whole_file_rename flag is used in parts of blame that are being moved to libgit, and should be accessible via the scoreboard structure. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff Smith committed
May 24, 2017 at 00:15 UTC
1f44129b21235b92d5261964253d965e2249d582
1 file changed
+3
-1
builtin/blame.c
+3
-1
@@ -386,6 +386,7 @@ struct blame_scoreboard {
386
int reverse;
387
int show_root;
388
int xdl_opts;
389
+ int no_whole_file_rename;
390
};
391
392
static void sanity_check_refcnt(struct blame_scoreboard *);
@@ -1411,7 +1412,7 @@ static void pass_blame(struct blame_scoreboard *sb, struct blame_origin *origin,
1412
* The first pass looks for unrenamed path to optimize for
1413
* common cases, then we look for renames in the second pass.
1414
*/
1414
- for (pass = 0; pass < 2 - no_whole_file_rename; pass++) {
1415
+ for (pass = 0; pass < 2 - sb->no_whole_file_rename; pass++) {
1416
struct blame_origin *(*find)(struct commit *, struct blame_origin *);
1417
find = pass ? find_rename : find_origin;
1418
@@ -2889,6 +2890,7 @@ parse_done:
2890
2891
sb.show_root = show_root;
2892
sb.xdl_opts = xdl_opts;
2893
+ sb.no_whole_file_rename = no_whole_file_rename;
2894
2895
read_mailmap(&mailmap, NULL);
2896