sequencer: make it clearer that commit descriptions are just comments

Every once in a while, users report that editing the commit summaries in the todo list does not get reflected in the rebase operation, suggesting that users are (a) only using one-line commit messages, and (b) not understanding that the commit summaries are merely helpful comments to help them find the right hashes. It may be difficult to correct users' poor commit messages, but we can at least try to make it clearer that the commit summaries are not directives of some sort by inserting a comment character. Hopefully that leads to them looking a little further and noticing the hints at the bottom to use 'reword' or 'edit' directives. Yes, this change may look funny at first since it hardcodes '#' rather than using comment_line_str. However: * comment_line_str exists to allow disambiguation between lines in a commit message and lines that are instructions to users editing the commit message. No such disambiguation is needed for these comments that occur on the same line after existing directives * the exact "comment" character(s) on regular pick lines used aren't actually important; I could have used anything, including completely random variable length text for each line and it'd work because we ignore everything after 'pick' and the hash. * The whole point of this change is to signal to users that they should NOT be editing any part of the line after the hash (and if they do so, their edits will be ignored), while the whole point of comment_line_str is to allow highly flexible editing. So making it more general by using comment_line_str actually feels counterproductive. * The character for merge directives absolutely must be '#'; that has been deeply hardcoded for a long time (see below), and will break if some other comment character is used instead. In a desire to have pick and merge directives be similar, I use the same comment character for both. * Perhaps merge directives could be fixed to not be inflexible about the comment character used, if someone feels highly motivated, but I think that should be done in a separate follow-on patch. Here are (some of?) the locations where '#' has already been hardcoded for a long time for merges: 1) In check_label_or_ref_arg(): case TODO_LABEL: /* * '#' is not a valid label as the merge command uses it to * separate merge parents from the commit subject. */ 2) In do_merge(): /* * For octopus merges, the arg starts with the list of revisions to be * merged. The list is optionally followed by '#' and the oneline. */ merge_arg_len = oneline_offset = arg_len; for (p = arg; p - arg < arg_len; p += strspn(p, " \t\n")) { if (!*p) break; if (*p == '#' && (!p[1] || isspace(p[1]))) { 3) In label_oid(): if ((buf->len == the_hash_algo->hexsz && !get_oid_hex(label, &dummy)) || (buf->len == 1 && *label == '#') || hashmap_get_from_hash(&state->labels, strihash(label), label)) { /* * If the label already exists, or if the label is a * valid full OID, or the label is a '#' (which we use * as a separator between merge heads and oneline), we * append a dash and a number to make it unique. */ Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed May 16, 2025 at 16:26 UTC e42667241de12840ef58c0ba1c060b86c850bae0
6 files changed +94 -88
sequencer.c
+11 -5
@@ -5901,11 +5901,11 @@ static int make_script_with_merges(struct pretty_print_context *pp,
5901
5902 /* Create a label from the commit message */
5903 strbuf_reset(&label_from_message);
5904 - if (skip_prefix(oneline.buf, "Merge ", &p1) &&
5904 + if (skip_prefix(oneline.buf, "# Merge ", &p1) &&
5905 (p1 = strchr(p1, '\'')) &&
5906 (p2 = strchr(++p1, '\'')))
5907 strbuf_add(&label_from_message, p1, p2 - p1);
5908 - else if (skip_prefix(oneline.buf, "Merge pull request ",
5908 + else if (skip_prefix(oneline.buf, "# Merge pull request ",
5909 &p1) &&
5910 (p1 = strstr(p1, " from ")))
5911 strbuf_addstr(&label_from_message, p1 + strlen(" from "));
@@ -5940,7 +5940,7 @@ static int make_script_with_merges(struct pretty_print_context *pp,
5940
5941 strbuf_addstr(&buf, label_oid(oid, label, &state));
5942 }
5943 - strbuf_addf(&buf, " # %s", oneline.buf);
5943 + strbuf_addf(&buf, " %s", oneline.buf);
5944
5945 FLEX_ALLOC_STR(entry, string, buf.buf);
5946 oidcpy(&entry->entry.oid, &commit->object.oid);
@@ -6022,7 +6022,7 @@ static int make_script_with_merges(struct pretty_print_context *pp,
6022 else {
6023 strbuf_reset(&oneline);
6024 pretty_print_commit(pp, commit, &oneline);
6025 - strbuf_addf(out, "%s %s # %s\n",
6025 + strbuf_addf(out, "%s %s %s\n",
6026 cmd_reset, to, oneline.buf);
6027 }
6028 }
@@ -6090,8 +6090,14 @@ int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
6090 git_config_get_string("rebase.instructionFormat", &format);
6091 if (!format || !*format) {
6092 free(format);
6093 - format = xstrdup("%s");
6093 + format = xstrdup("# %s");
6094 }
6095 + if (*format != '#') {
6096 + char *temp = format;
6097 + format = xstrfmt("# %s", temp);
6098 + free(temp);
6099 + }
6100 +
6101 get_commit_format(format, &revs);
6102 free(format);
6103 pp.fmt = revs.commit_format;
t/t3404-rebase-interactive.sh
+27 -27
@@ -1468,7 +1468,7 @@ test_expect_success 'rebase -i respects rebase.missingCommitsCheck = warn' '
1468 cat >expect <<-EOF &&
1469 Warning: some commits may have been dropped accidentally.
1470 Dropped commits (newer to older):
1471 - - $(git rev-list --pretty=oneline --abbrev-commit -1 primary)
1471 + - $(git log --format="%h # %s" -1 primary)
1472 To avoid this message, use "drop" to explicitly remove a commit.
1473 EOF
1474 test_config rebase.missingCommitsCheck warn &&
@@ -1486,8 +1486,8 @@ test_expect_success 'rebase -i respects rebase.missingCommitsCheck = error' '
1486 cat >expect <<-EOF &&
1487 Warning: some commits may have been dropped accidentally.
1488 Dropped commits (newer to older):
1489 - - $(git rev-list --pretty=oneline --abbrev-commit -1 primary)
1490 - - $(git rev-list --pretty=oneline --abbrev-commit -1 primary~2)
1489 + - $(git log --format="%h # %s" -1 primary)
1490 + - $(git log --format="%h # %s" -1 primary~2)
1491 To avoid this message, use "drop" to explicitly remove a commit.
1492
1493 Use '\''git config rebase.missingCommitsCheck'\'' to change the level of warnings.
@@ -1530,11 +1530,11 @@ test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = ig
1530 test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = warn' '
1531 cat >expect <<-EOF &&
1532 error: invalid command '\''pickled'\''
1533 - error: invalid line 1: pickled $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
1533 + error: invalid line 1: pickled $(git log --format="%h # %s" -1 primary~4)
1534 Warning: some commits may have been dropped accidentally.
1535 Dropped commits (newer to older):
1536 - - $(git rev-list --pretty=oneline --abbrev-commit -1 primary)
1537 - - $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
1536 + - $(git log --format="%h # %s" -1 primary)
1537 + - $(git log --format="%h # %s" -1 primary~4)
1538 To avoid this message, use "drop" to explicitly remove a commit.
1539 EOF
1540 head -n5 expect >expect.2 &&
@@ -1565,11 +1565,11 @@ test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = wa
1565 test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = error' '
1566 cat >expect <<-EOF &&
1567 error: invalid command '\''pickled'\''
1568 - error: invalid line 1: pickled $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
1568 + error: invalid line 1: pickled $(git log --format="%h # %s" -1 primary~4)
1569 Warning: some commits may have been dropped accidentally.
1570 Dropped commits (newer to older):
1571 - - $(git rev-list --pretty=oneline --abbrev-commit -1 primary)
1572 - - $(git rev-list --pretty=oneline --abbrev-commit -1 primary~4)
1571 + - $(git log --format="%h # %s" -1 primary)
1572 + - $(git log --format="%h # %s" -1 primary~4)
1573 To avoid this message, use "drop" to explicitly remove a commit.
1574
1575 Use '\''git config rebase.missingCommitsCheck'\'' to change the level of warnings.
@@ -1642,11 +1642,11 @@ test_expect_success 'respects rebase.abbreviateCommands with fixup, squash and e
1642 test_commit "fixup! first" file2.txt "first line again" first_fixup &&
1643 test_commit "squash! second" file1.txt "another line here" second_squash &&
1644 cat >expected <<-EOF &&
1645 - p $(git rev-list --abbrev-commit -1 first) first
1646 - f $(git rev-list --abbrev-commit -1 first_fixup) fixup! first
1645 + p $(git rev-list --abbrev-commit -1 first) # first
1646 + f $(git rev-list --abbrev-commit -1 first_fixup) # fixup! first
1647 x git show HEAD
1648 - p $(git rev-list --abbrev-commit -1 second) second
1649 - s $(git rev-list --abbrev-commit -1 second_squash) squash! second
1648 + p $(git rev-list --abbrev-commit -1 second) # second
1649 + s $(git rev-list --abbrev-commit -1 second_squash) # squash! second
1650 x git show HEAD
1651 EOF
1652 git checkout abbrevcmd &&
@@ -1665,7 +1665,7 @@ test_expect_success 'static check of bad command' '
1665 set_fake_editor &&
1666 test_must_fail env FAKE_LINES="1 2 3 bad 4 5" \
1667 git rebase -i --root 2>actual &&
1668 - test_grep "pickled $(git rev-list --oneline -1 primary~1)" \
1668 + test_grep "pickled $(git log --format="%h # %s" -1 primary~1)" \
1669 actual &&
1670 test_grep "You can fix this with .git rebase --edit-todo.." \
1671 actual &&
@@ -1865,15 +1865,15 @@ test_expect_success '--update-refs adds label and update-ref commands' '
1865 set_cat_todo_editor &&
1866
1867 cat >expect <<-EOF &&
1868 - pick $(git log -1 --format=%h J) J
1869 - fixup $(git log -1 --format=%h update-refs) fixup! J # empty
1868 + pick $(git log -1 --format=%h J) # J
1869 + fixup $(git log -1 --format=%h update-refs) # fixup! J # empty
1870 update-ref refs/heads/second
1871 update-ref refs/heads/first
1872 - pick $(git log -1 --format=%h K) K
1873 - pick $(git log -1 --format=%h L) L
1874 - fixup $(git log -1 --format=%h is-not-reordered) fixup! L # empty
1872 + pick $(git log -1 --format=%h K) # K
1873 + pick $(git log -1 --format=%h L) # L
1874 + fixup $(git log -1 --format=%h is-not-reordered) # fixup! L # empty
1875 update-ref refs/heads/third
1876 - pick $(git log -1 --format=%h M) M
1876 + pick $(git log -1 --format=%h M) # M
1877 update-ref refs/heads/no-conflict-branch
1878 update-ref refs/heads/is-not-reordered
1879 update-ref refs/heads/shared-tip
@@ -1905,19 +1905,19 @@ test_expect_success '--update-refs adds commands with --rebase-merges' '
1905 cat >expect <<-EOF &&
1906 label onto
1907 reset onto
1908 - pick $(git log -1 --format=%h branch2~1) F
1909 - pick $(git log -1 --format=%h branch2) I
1908 + pick $(git log -1 --format=%h branch2~1) # F
1909 + pick $(git log -1 --format=%h branch2) # I
1910 update-ref refs/heads/branch2
1911 label branch2
1912 reset onto
1913 - pick $(git log -1 --format=%h refs/heads/second) J
1913 + pick $(git log -1 --format=%h refs/heads/second) # J
1914 update-ref refs/heads/second
1915 update-ref refs/heads/first
1916 - pick $(git log -1 --format=%h refs/heads/third~1) K
1917 - pick $(git log -1 --format=%h refs/heads/third) L
1918 - fixup $(git log -1 --format=%h update-refs-with-merge) fixup! L # empty
1916 + pick $(git log -1 --format=%h refs/heads/third~1) # K
1917 + pick $(git log -1 --format=%h refs/heads/third) # L
1918 + fixup $(git log -1 --format=%h update-refs-with-merge) # fixup! L # empty
1919 update-ref refs/heads/third
1920 - pick $(git log -1 --format=%h HEAD~2) M
1920 + pick $(git log -1 --format=%h HEAD~2) # M
1921 update-ref refs/heads/no-conflict-branch
1922 merge -C $(git log -1 --format=%h HEAD~1) branch2 # merge
1923 update-ref refs/heads/merge-branch
t/t3415-rebase-autosquash.sh
+7 -7
@@ -257,8 +257,8 @@ test_expect_success 'auto squash of fixup commit that matches branch name which
257 GIT_SEQUENCE_EDITOR="cat >tmp" git rebase --autosquash -i HEAD^^ &&
258 sed -ne "/^[^#]/{s/[0-9a-f]\{7,\}/HASH/g;p;}" tmp >actual &&
259 cat <<-EOF >expect &&
260 - pick HASH second commit
261 - pick HASH fixup! self-cycle # empty
260 + pick HASH # second commit
261 + pick HASH # fixup! self-cycle # empty
262 EOF
263 test_cmp expect actual
264 '
@@ -311,10 +311,10 @@ test_auto_fixup_fixup () {
311 parent2=$(git rev-parse --short HEAD^^) &&
312 parent3=$(git rev-parse --short HEAD^^^) &&
313 cat >expected <<-EOF &&
314 - pick $parent3 first commit
315 - $1 $parent1 $1! first
316 - $1 $head $1! $2! first
317 - pick $parent2 second commit
314 + pick $parent3 # first commit
315 + $1 $parent1 # $1! first
316 + $1 $head # $1! $2! first
317 + pick $parent2 # second commit
318 EOF
319 test_cmp expected actual
320 ) &&
@@ -389,7 +389,7 @@ test_expect_success 'autosquash with empty custom instructionFormat' '
389 set_cat_todo_editor &&
390 test_must_fail git -c rebase.instructionFormat= \
391 rebase --autosquash --force-rebase -i HEAD^ >actual &&
392 - git log -1 --format="pick %h %s" >expect &&
392 + git log -1 --format="pick %h # %s" >expect &&
393 test_cmp expect actual
394 )
395 '
t/t3430-rebase-merges.sh
+5 -5
@@ -106,18 +106,18 @@ test_expect_success 'generate correct todo list' '
106 label onto
107
108 reset onto
109 - pick $b B
109 + pick $b # B
110 label first
111
112 reset onto
113 - pick $c C
113 + pick $c # C
114 label branch-point
115 - pick $f F
116 - pick $g G
115 + pick $f # F
116 + pick $g # G
117 label second
118
119 reset branch-point # C
120 - pick $d D
120 + pick $d # D
121 merge -C $e first # E
122 merge -C $h second # H
123
t/t5520-pull.sh
+1 -1
@@ -813,7 +813,7 @@ test_expect_success 'git pull --rebase does not reapply old patches' '
813 cd dst &&
814 test_must_fail git pull --rebase &&
815 cat .git/rebase-merge/done .git/rebase-merge/git-rebase-todo >work &&
816 - grep -v -e \# -e ^$ work >patches &&
816 + grep -v -e ^\# -e ^$ work >patches &&
817 test_line_count = 1 patches &&
818 rm -f work
819 )
t/t7512-status-help.sh
+43 -43
@@ -139,7 +139,7 @@ test_expect_success 'status during rebase -i when conflicts unresolved' '
139 cat >expected <<EOF &&
140 interactive rebase in progress; onto $ONTO
141 Last command done (1 command done):
142 - pick $LAST_COMMIT one_second
142 + pick $LAST_COMMIT # one_second
143 No commands remaining.
144 You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
145 (fix conflicts and then run "git rebase --continue")
@@ -168,7 +168,7 @@ test_expect_success 'status during rebase -i after resolving conflicts' '
168 cat >expected <<EOF &&
169 interactive rebase in progress; onto $ONTO
170 Last command done (1 command done):
171 - pick $LAST_COMMIT one_second
171 + pick $LAST_COMMIT # one_second
172 No commands remaining.
173 You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
174 (all conflicts fixed: run "git rebase --continue")
@@ -200,8 +200,8 @@ test_expect_success 'status when rebasing -i in edit mode' '
200 cat >expected <<EOF &&
201 interactive rebase in progress; onto $ONTO
202 Last commands done (2 commands done):
203 - pick $COMMIT2 two_rebase_i
204 - edit $COMMIT3 three_rebase_i
203 + pick $COMMIT2 # two_rebase_i
204 + edit $COMMIT3 # three_rebase_i
205 No commands remaining.
206 You are currently editing a commit while rebasing branch '\''rebase_i_edit'\'' on '\''$ONTO'\''.
207 (use "git commit --amend" to amend the current commit)
@@ -233,10 +233,10 @@ test_expect_success 'status when splitting a commit' '
233 cat >expected <<EOF &&
234 interactive rebase in progress; onto $ONTO
235 Last commands done (2 commands done):
236 - pick $COMMIT2 two_split
237 - edit $COMMIT3 three_split
236 + pick $COMMIT2 # two_split
237 + edit $COMMIT3 # three_split
238 Next command to do (1 remaining command):
239 - pick $COMMIT4 four_split
239 + pick $COMMIT4 # four_split
240 (use "git rebase --edit-todo" to view and edit)
241 You are currently splitting a commit while rebasing branch '\''split_commit'\'' on '\''$ONTO'\''.
242 (Once your working directory is clean, run "git rebase --continue")
@@ -271,8 +271,8 @@ test_expect_success 'status after editing the last commit with --amend during a
271 cat >expected <<EOF &&
272 interactive rebase in progress; onto $ONTO
273 Last commands done (3 commands done):
274 - pick $COMMIT3 three_amend
275 - edit $COMMIT4 four_amend
274 + pick $COMMIT3 # three_amend
275 + edit $COMMIT4 # four_amend
276 (see more in file .git/rebase-merge/done)
277 No commands remaining.
278 You are currently editing a commit while rebasing branch '\''amend_last'\'' on '\''$ONTO'\''.
@@ -309,10 +309,10 @@ test_expect_success 'status: (continue first edit) second edit' '
309 cat >expected <<EOF &&
310 interactive rebase in progress; onto $ONTO
311 Last commands done (2 commands done):
312 - edit $COMMIT2 two_edits
313 - edit $COMMIT3 three_edits
312 + edit $COMMIT2 # two_edits
313 + edit $COMMIT3 # three_edits
314 Next command to do (1 remaining command):
315 - pick $COMMIT4 four_edits
315 + pick $COMMIT4 # four_edits
316 (use "git rebase --edit-todo" to view and edit)
317 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
318 (use "git commit --amend" to amend the current commit)
@@ -340,10 +340,10 @@ test_expect_success 'status: (continue first edit) second edit and split' '
340 cat >expected <<EOF &&
341 interactive rebase in progress; onto $ONTO
342 Last commands done (2 commands done):
343 - edit $COMMIT2 two_edits
344 - edit $COMMIT3 three_edits
343 + edit $COMMIT2 # two_edits
344 + edit $COMMIT3 # three_edits
345 Next command to do (1 remaining command):
346 - pick $COMMIT4 four_edits
346 + pick $COMMIT4 # four_edits
347 (use "git rebase --edit-todo" to view and edit)
348 You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
349 (Once your working directory is clean, run "git rebase --continue")
@@ -375,10 +375,10 @@ test_expect_success 'status: (continue first edit) second edit and amend' '
375 cat >expected <<EOF &&
376 interactive rebase in progress; onto $ONTO
377 Last commands done (2 commands done):
378 - edit $COMMIT2 two_edits
379 - edit $COMMIT3 three_edits
378 + edit $COMMIT2 # two_edits
379 + edit $COMMIT3 # three_edits
380 Next command to do (1 remaining command):
381 - pick $COMMIT4 four_edits
381 + pick $COMMIT4 # four_edits
382 (use "git rebase --edit-todo" to view and edit)
383 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
384 (use "git commit --amend" to amend the current commit)
@@ -406,10 +406,10 @@ test_expect_success 'status: (amend first edit) second edit' '
406 cat >expected <<EOF &&
407 interactive rebase in progress; onto $ONTO
408 Last commands done (2 commands done):
409 - edit $COMMIT2 two_edits
410 - edit $COMMIT3 three_edits
409 + edit $COMMIT2 # two_edits
410 + edit $COMMIT3 # three_edits
411 Next command to do (1 remaining command):
412 - pick $COMMIT4 four_edits
412 + pick $COMMIT4 # four_edits
413 (use "git rebase --edit-todo" to view and edit)
414 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
415 (use "git commit --amend" to amend the current commit)
@@ -438,10 +438,10 @@ test_expect_success 'status: (amend first edit) second edit and split' '
438 cat >expected <<EOF &&
439 interactive rebase in progress; onto $ONTO
440 Last commands done (2 commands done):
441 - edit $COMMIT2 two_edits
442 - edit $COMMIT3 three_edits
441 + edit $COMMIT2 # two_edits
442 + edit $COMMIT3 # three_edits
443 Next command to do (1 remaining command):
444 - pick $COMMIT4 four_edits
444 + pick $COMMIT4 # four_edits
445 (use "git rebase --edit-todo" to view and edit)
446 You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
447 (Once your working directory is clean, run "git rebase --continue")
@@ -474,10 +474,10 @@ test_expect_success 'status: (amend first edit) second edit and amend' '
474 cat >expected <<EOF &&
475 interactive rebase in progress; onto $ONTO
476 Last commands done (2 commands done):
477 - edit $COMMIT2 two_edits
478 - edit $COMMIT3 three_edits
477 + edit $COMMIT2 # two_edits
478 + edit $COMMIT3 # three_edits
479 Next command to do (1 remaining command):
480 - pick $COMMIT4 four_edits
480 + pick $COMMIT4 # four_edits
481 (use "git rebase --edit-todo" to view and edit)
482 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
483 (use "git commit --amend" to amend the current commit)
@@ -507,10 +507,10 @@ test_expect_success 'status: (split first edit) second edit' '
507 cat >expected <<EOF &&
508 interactive rebase in progress; onto $ONTO
509 Last commands done (2 commands done):
510 - edit $COMMIT2 two_edits
511 - edit $COMMIT3 three_edits
510 + edit $COMMIT2 # two_edits
511 + edit $COMMIT3 # three_edits
512 Next command to do (1 remaining command):
513 - pick $COMMIT4 four_edits
513 + pick $COMMIT4 # four_edits
514 (use "git rebase --edit-todo" to view and edit)
515 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
516 (use "git commit --amend" to amend the current commit)
@@ -541,10 +541,10 @@ test_expect_success 'status: (split first edit) second edit and split' '
541 cat >expected <<EOF &&
542 interactive rebase in progress; onto $ONTO
543 Last commands done (2 commands done):
544 - edit $COMMIT2 two_edits
545 - edit $COMMIT3 three_edits
544 + edit $COMMIT2 # two_edits
545 + edit $COMMIT3 # three_edits
546 Next command to do (1 remaining command):
547 - pick $COMMIT4 four_edits
547 + pick $COMMIT4 # four_edits
548 (use "git rebase --edit-todo" to view and edit)
549 You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
550 (Once your working directory is clean, run "git rebase --continue")
@@ -579,10 +579,10 @@ test_expect_success 'status: (split first edit) second edit and amend' '
579 cat >expected <<EOF &&
580 interactive rebase in progress; onto $ONTO
581 Last commands done (2 commands done):
582 - edit $COMMIT2 two_edits
583 - edit $COMMIT3 three_edits
582 + edit $COMMIT2 # two_edits
583 + edit $COMMIT3 # three_edits
584 Next command to do (1 remaining command):
585 - pick $COMMIT4 four_edits
585 + pick $COMMIT4 # four_edits
586 (use "git rebase --edit-todo" to view and edit)
587 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
588 (use "git commit --amend" to amend the current commit)
@@ -997,11 +997,11 @@ test_expect_success 'status: two commands done with some white lines in done fil
997 cat >expected <<EOF &&
998 interactive rebase in progress; onto $ONTO
999 Last commands done (2 commands done):
1000 - pick $COMMIT2 two_commit
1000 + pick $COMMIT2 # two_commit
1001 exec exit 15
1002 Next commands to do (2 remaining commands):
1003 - pick $COMMIT3 three_commit
1004 - pick $COMMIT4 four_commit
1003 + pick $COMMIT3 # three_commit
1004 + pick $COMMIT4 # four_commit
1005 (use "git rebase --edit-todo" to view and edit)
1006 You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''.
1007 (use "git commit --amend" to amend the current commit)
@@ -1025,12 +1025,12 @@ test_expect_success 'status: two remaining commands with some white lines in tod
1025 cat >expected <<EOF &&
1026 interactive rebase in progress; onto $ONTO
1027 Last commands done (3 commands done):
1028 - pick $COMMIT2 two_commit
1028 + pick $COMMIT2 # two_commit
1029 exec exit 15
1030 (see more in file .git/rebase-merge/done)
1031 Next commands to do (2 remaining commands):
1032 - pick $COMMIT3 three_commit
1033 - pick $COMMIT4 four_commit
1032 + pick $COMMIT3 # three_commit
1033 + pick $COMMIT4 # four_commit
1034 (use "git rebase --edit-todo" to view and edit)
1035 You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''.
1036 (use "git commit --amend" to amend the current commit)
@@ -1050,7 +1050,7 @@ test_expect_success 'status: handle not-yet-started rebase -i gracefully' '
1050 On branch several_commits
1051 No commands done.
1052 Next command to do (1 remaining command):
1053 - pick $COMMIT four_commit
1053 + pick $COMMIT # four_commit
1054 (use "git rebase --edit-todo" to view and edit)
1055 You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''.
1056 (use "git commit --amend" to amend the current commit)