Skip to content

Commit c01d8f9

Browse files
Stephen P. Smithgitster
authored andcommitted
wt-status.c: move has_unmerged earlier in the file
Move has_unmerged() up in the file so that it can be called in wt_status_collect() where we need to place a merge check. Signed-off-by: Stephen P. Smith <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c05048d commit c01d8f9

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

wt-status.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,19 @@ static void wt_status_collect_untracked(struct wt_status *s)
724724
s->untracked_in_ms = (getnanotime() - t_begin) / 1000000;
725725
}
726726

727+
static int has_unmerged(struct wt_status *s)
728+
{
729+
int i;
730+
731+
for (i = 0; i < s->change.nr; i++) {
732+
struct wt_status_change_data *d;
733+
d = s->change.items[i].util;
734+
if (d->stagemask)
735+
return 1;
736+
}
737+
return 0;
738+
}
739+
727740
void wt_status_collect(struct wt_status *s)
728741
{
729742
wt_status_collect_changes_worktree(s);
@@ -1063,19 +1076,6 @@ static void wt_longstatus_print_tracking(struct wt_status *s)
10631076
strbuf_release(&sb);
10641077
}
10651078

1066-
static int has_unmerged(struct wt_status *s)
1067-
{
1068-
int i;
1069-
1070-
for (i = 0; i < s->change.nr; i++) {
1071-
struct wt_status_change_data *d;
1072-
d = s->change.items[i].util;
1073-
if (d->stagemask)
1074-
return 1;
1075-
}
1076-
return 0;
1077-
}
1078-
10791079
static void show_merge_in_progress(struct wt_status *s,
10801080
struct wt_status_state *state,
10811081
const char *color)

0 commit comments

Comments
 (0)