diff --git a/t/t7064-wtstatus-pv2.sh b/t/t7064-wtstatus-pv2.sh index 11884d2fc36911..7ca1ef6accaf6d 100755 --- a/t/t7064-wtstatus-pv2.sh +++ b/t/t7064-wtstatus-pv2.sh @@ -295,6 +295,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 @@ -335,6 +336,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 eb627c0bd09d7d..4d2a70dd5794c6 100755 --- a/t/t7512-status-help.sh +++ b/t/t7512-status-help.sh @@ -99,7 +99,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 ' @@ -166,7 +168,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 ' @@ -636,7 +640,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 ' @@ -710,7 +716,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 ' @@ -803,7 +811,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 ' @@ -937,7 +947,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 3d95ff6ad112e1..5546aace3c9e6e 100644 --- a/wt-status.c +++ b/wt-status.c @@ -2269,6 +2269,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); } /*