Skip to content

Commit 094aa09

Browse files
committed
Merge branch 'rs/wt-status-cleanup'
Code cleanup. * rs/wt-status-cleanup: wt-status: use separate variable for result of shorten_unambiguous_ref
2 parents f056cde + 5e8d272 commit 094aa09

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

wt-status.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,6 +1763,7 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)
17631763
const char *branch_color_remote = color(WT_STATUS_REMOTE_BRANCH, s);
17641764

17651765
const char *base;
1766+
char *short_base;
17661767
const char *branch_name;
17671768
int num_ours, num_theirs;
17681769
int upstream_is_gone = 0;
@@ -1797,10 +1798,10 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)
17971798
upstream_is_gone = 1;
17981799
}
17991800

1800-
base = shorten_unambiguous_ref(base, 0);
1801+
short_base = shorten_unambiguous_ref(base, 0);
18011802
color_fprintf(s->fp, header_color, "...");
1802-
color_fprintf(s->fp, branch_color_remote, "%s", base);
1803-
free((char *)base);
1803+
color_fprintf(s->fp, branch_color_remote, "%s", short_base);
1804+
free(short_base);
18041805

18051806
if (!upstream_is_gone && !num_ours && !num_theirs)
18061807
goto conclude;

0 commit comments

Comments
 (0)