diff --git a/t/t7064-wtstatus-pv2.sh b/t/t7064-wtstatus-pv2.sh index 06c130122236aa..655033e3289bb1 100755 --- a/t/t7064-wtstatus-pv2.sh +++ b/t/t7064-wtstatus-pv2.sh @@ -296,6 +296,7 @@ test_expect_success 'verify AA (add-add) conflict' ' cat >expect <<-EOF && # branch.oid $HM # branch.head AA_M + # branch.inprogress MERGING u AA N... 000000 100644 100644 100644 $ZERO_OID $OID_AA_B $OID_AA_A conflict.txt EOF @@ -336,6 +337,7 @@ test_expect_success 'verify UU (edit-edit) conflict' ' cat >expect <<-EOF && # branch.oid $HM # branch.head UU_M + # branch.inprogress MERGING u UU N... 100644 100644 100644 100644 $OID_UU_ANC $OID_UU_B $OID_UU_A conflict.txt EOF diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index 59805eb35fc5bd..a02c0507294679 100755 --- a/t/t7512-status-help.sh +++ b/t/t7512-status-help.sh @@ -100,7 +100,9 @@ EOF UU main.txt EOF git status --untracked-files=no --short --branch --in-progress >actual && - test_cmp expected actual + test_cmp expected actual && + git status --untracked-files=no --porcelain=v2 --branch >actual && + test_grep "^# branch.inprogress REBASE-m$" actual ' @@ -167,7 +169,9 @@ EOF UU main.txt EOF git status --untracked-files=no --short --branch --in-progress >actual && - test_cmp expected actual + test_cmp expected actual && + git status --untracked-files=no --porcelain=v2 --branch >actual && + test_grep "^# branch.inprogress REBASE-i$" actual ' @@ -637,7 +641,9 @@ EOF ## am_already_exists; AM EOF git status --untracked-files=no --short --branch --in-progress >actual && - test_cmp expected actual + test_cmp expected actual && + git status --untracked-files=no --porcelain=v2 --branch >actual && + test_grep "^# branch.inprogress AM$" actual ' @@ -711,7 +717,9 @@ EOF ## HEAD (no branch); BISECTING EOF git status --untracked-files=no --short --branch --in-progress >actual && - test_cmp expected actual + test_cmp expected actual && + git status --untracked-files=no --porcelain=v2 --branch >actual && + test_grep "^# branch.inprogress BISECTING$" actual ' @@ -804,7 +812,9 @@ EOF UU main.txt EOF git status --untracked-files=no --short --branch --in-progress >actual && - test_cmp expected actual + test_cmp expected actual && + git status --untracked-files=no --porcelain=v2 --branch >actual && + test_grep "^# branch.inprogress CHERRY-PICKING$" actual ' @@ -938,7 +948,9 @@ EOF UU to-revert.txt EOF git status --untracked-files=no --short --branch --in-progress >actual && - test_cmp expected actual + test_cmp expected actual && + git status --untracked-files=no --porcelain=v2 --branch >actual && + test_grep "^# branch.inprogress REVERTING$" actual ' diff --git a/wt-status.c b/wt-status.c index 6130d534f58339..ed8832f7c4bf70 100644 --- a/wt-status.c +++ b/wt-status.c @@ -2271,6 +2271,20 @@ static void wt_porcelain_v2_print_tracking(struct wt_status *s) } } } + if (s->state.merge_in_progress) + fprintf(s->fp, "# branch.inprogress %s%c", "MERGING", eol); + if (s->state.am_in_progress) + fprintf(s->fp, "# branch.inprogress %s%c", "AM", eol); + if (s->state.rebase_in_progress) + fprintf(s->fp, "# branch.inprogress %s%c", "REBASE-m", eol); + if (s->state.rebase_interactive_in_progress) + fprintf(s->fp, "# branch.inprogress %s%c", "REBASE-i", eol); + if (s->state.cherry_pick_in_progress) + fprintf(s->fp, "# branch.inprogress %s%c", "CHERRY-PICKING", eol); + if (s->state.revert_in_progress) + fprintf(s->fp, "# branch.inprogress %s%c", "REVERTING", eol); + if (s->state.bisect_in_progress) + fprintf(s->fp, "# branch.inprogress %s%c", "BISECTING", eol); } /*