Skip to content

Commit 1f44129

Browse files
whydoubtgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 73e1c29 commit 1f44129

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builtin/blame.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ struct blame_scoreboard {
386386
int reverse;
387387
int show_root;
388388
int xdl_opts;
389+
int no_whole_file_rename;
389390
};
390391

391392
static void sanity_check_refcnt(struct blame_scoreboard *);
@@ -1411,7 +1412,7 @@ static void pass_blame(struct blame_scoreboard *sb, struct blame_origin *origin,
14111412
* The first pass looks for unrenamed path to optimize for
14121413
* common cases, then we look for renames in the second pass.
14131414
*/
1414-
for (pass = 0; pass < 2 - no_whole_file_rename; pass++) {
1415+
for (pass = 0; pass < 2 - sb->no_whole_file_rename; pass++) {
14151416
struct blame_origin *(*find)(struct commit *, struct blame_origin *);
14161417
find = pass ? find_rename : find_origin;
14171418

@@ -2889,6 +2890,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
28892890

28902891
sb.show_root = show_root;
28912892
sb.xdl_opts = xdl_opts;
2893+
sb.no_whole_file_rename = no_whole_file_rename;
28922894

28932895
read_mailmap(&mailmap, NULL);
28942896

0 commit comments

Comments
 (0)