Skip to content

Commit f2e5119

Browse files
bk2204gitster
authored andcommitted
wt-status: convert two uses of EMPTY_TREE_SHA1_HEX
Convert two uses of EMPTY_TREE_SHA1_HEX to use empty_tree_oid_hex to avoid a dependency on a given hash algorithm. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 939b89a commit f2e5119

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wt-status.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ static void wt_status_collect_changes_index(struct wt_status *s)
603603

604604
init_revisions(&rev, NULL);
605605
memset(&opt, 0, sizeof(opt));
606-
opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference;
606+
opt.def = s->is_initial ? empty_tree_oid_hex() : s->reference;
607607
setup_revisions(0, NULL, &rev, &opt);
608608

609609
rev.diffopt.flags.override_submodule_config = 1;
@@ -981,7 +981,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s)
981981
rev.diffopt.ita_invisible_in_index = 1;
982982

983983
memset(&opt, 0, sizeof(opt));
984-
opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference;
984+
opt.def = s->is_initial ? empty_tree_oid_hex() : s->reference;
985985
setup_revisions(0, NULL, &rev, &opt);
986986

987987
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;

0 commit comments

Comments
 (0)