Git fork

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>

authored by

Elijah Newren and committed by
Junio C Hamano
e4266724 cb96e169

+94 -88
+11 -5
sequencer.c
··· 5901 5901 5902 5902 /* Create a label from the commit message */ 5903 5903 strbuf_reset(&label_from_message); 5904 - if (skip_prefix(oneline.buf, "Merge ", &p1) && 5904 + if (skip_prefix(oneline.buf, "# Merge ", &p1) && 5905 5905 (p1 = strchr(p1, '\'')) && 5906 5906 (p2 = strchr(++p1, '\''))) 5907 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 5909 &p1) && 5910 5910 (p1 = strstr(p1, " from "))) 5911 5911 strbuf_addstr(&label_from_message, p1 + strlen(" from ")); ··· 5940 5940 5941 5941 strbuf_addstr(&buf, label_oid(oid, label, &state)); 5942 5942 } 5943 - strbuf_addf(&buf, " # %s", oneline.buf); 5943 + strbuf_addf(&buf, " %s", oneline.buf); 5944 5944 5945 5945 FLEX_ALLOC_STR(entry, string, buf.buf); 5946 5946 oidcpy(&entry->entry.oid, &commit->object.oid); ··· 6022 6022 else { 6023 6023 strbuf_reset(&oneline); 6024 6024 pretty_print_commit(pp, commit, &oneline); 6025 - strbuf_addf(out, "%s %s # %s\n", 6025 + strbuf_addf(out, "%s %s %s\n", 6026 6026 cmd_reset, to, oneline.buf); 6027 6027 } 6028 6028 } ··· 6090 6090 git_config_get_string("rebase.instructionFormat", &format); 6091 6091 if (!format || !*format) { 6092 6092 free(format); 6093 - format = xstrdup("%s"); 6093 + format = xstrdup("# %s"); 6094 6094 } 6095 + if (*format != '#') { 6096 + char *temp = format; 6097 + format = xstrfmt("# %s", temp); 6098 + free(temp); 6099 + } 6100 + 6095 6101 get_commit_format(format, &revs); 6096 6102 free(format); 6097 6103 pp.fmt = revs.commit_format;
+27 -27
t/t3404-rebase-interactive.sh
··· 1468 1468 cat >expect <<-EOF && 1469 1469 Warning: some commits may have been dropped accidentally. 1470 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 1472 To avoid this message, use "drop" to explicitly remove a commit. 1473 1473 EOF 1474 1474 test_config rebase.missingCommitsCheck warn && ··· 1486 1486 cat >expect <<-EOF && 1487 1487 Warning: some commits may have been dropped accidentally. 1488 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 1491 To avoid this message, use "drop" to explicitly remove a commit. 1492 1492 1493 1493 Use '\''git config rebase.missingCommitsCheck'\'' to change the level of warnings. ··· 1530 1530 test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = warn' ' 1531 1531 cat >expect <<-EOF && 1532 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 1534 Warning: some commits may have been dropped accidentally. 1535 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 1538 To avoid this message, use "drop" to explicitly remove a commit. 1539 1539 EOF 1540 1540 head -n5 expect >expect.2 && ··· 1565 1565 test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = error' ' 1566 1566 cat >expect <<-EOF && 1567 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 1569 Warning: some commits may have been dropped accidentally. 1570 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 1573 To avoid this message, use "drop" to explicitly remove a commit. 1574 1574 1575 1575 Use '\''git config rebase.missingCommitsCheck'\'' to change the level of warnings. ··· 1642 1642 test_commit "fixup! first" file2.txt "first line again" first_fixup && 1643 1643 test_commit "squash! second" file1.txt "another line here" second_squash && 1644 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 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 1650 x git show HEAD 1651 1651 EOF 1652 1652 git checkout abbrevcmd && ··· 1665 1665 set_fake_editor && 1666 1666 test_must_fail env FAKE_LINES="1 2 3 bad 4 5" \ 1667 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 1669 actual && 1670 1670 test_grep "You can fix this with .git rebase --edit-todo.." \ 1671 1671 actual && ··· 1865 1865 set_cat_todo_editor && 1866 1866 1867 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 1870 update-ref refs/heads/second 1871 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 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 1877 update-ref refs/heads/no-conflict-branch 1878 1878 update-ref refs/heads/is-not-reordered 1879 1879 update-ref refs/heads/shared-tip ··· 1905 1905 cat >expect <<-EOF && 1906 1906 label onto 1907 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 1910 update-ref refs/heads/branch2 1911 1911 label branch2 1912 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 1914 update-ref refs/heads/second 1915 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 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 1921 update-ref refs/heads/no-conflict-branch 1922 1922 merge -C $(git log -1 --format=%h HEAD~1) branch2 # merge 1923 1923 update-ref refs/heads/merge-branch
+7 -7
t/t3415-rebase-autosquash.sh
··· 257 257 GIT_SEQUENCE_EDITOR="cat >tmp" git rebase --autosquash -i HEAD^^ && 258 258 sed -ne "/^[^#]/{s/[0-9a-f]\{7,\}/HASH/g;p;}" tmp >actual && 259 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 262 EOF 263 263 test_cmp expect actual 264 264 ' ··· 311 311 parent2=$(git rev-parse --short HEAD^^) && 312 312 parent3=$(git rev-parse --short HEAD^^^) && 313 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 318 EOF 319 319 test_cmp expected actual 320 320 ) && ··· 389 389 set_cat_todo_editor && 390 390 test_must_fail git -c rebase.instructionFormat= \ 391 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 393 test_cmp expect actual 394 394 ) 395 395 '
+5 -5
t/t3430-rebase-merges.sh
··· 106 106 label onto 107 107 108 108 reset onto 109 - pick $b B 109 + pick $b # B 110 110 label first 111 111 112 112 reset onto 113 - pick $c C 113 + pick $c # C 114 114 label branch-point 115 - pick $f F 116 - pick $g G 115 + pick $f # F 116 + pick $g # G 117 117 label second 118 118 119 119 reset branch-point # C 120 - pick $d D 120 + pick $d # D 121 121 merge -C $e first # E 122 122 merge -C $h second # H 123 123
+1 -1
t/t5520-pull.sh
··· 813 813 cd dst && 814 814 test_must_fail git pull --rebase && 815 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 817 test_line_count = 1 patches && 818 818 rm -f work 819 819 )
+43 -43
t/t7512-status-help.sh
··· 139 139 cat >expected <<EOF && 140 140 interactive rebase in progress; onto $ONTO 141 141 Last command done (1 command done): 142 - pick $LAST_COMMIT one_second 142 + pick $LAST_COMMIT # one_second 143 143 No commands remaining. 144 144 You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''. 145 145 (fix conflicts and then run "git rebase --continue") ··· 168 168 cat >expected <<EOF && 169 169 interactive rebase in progress; onto $ONTO 170 170 Last command done (1 command done): 171 - pick $LAST_COMMIT one_second 171 + pick $LAST_COMMIT # one_second 172 172 No commands remaining. 173 173 You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''. 174 174 (all conflicts fixed: run "git rebase --continue") ··· 200 200 cat >expected <<EOF && 201 201 interactive rebase in progress; onto $ONTO 202 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 205 No commands remaining. 206 206 You are currently editing a commit while rebasing branch '\''rebase_i_edit'\'' on '\''$ONTO'\''. 207 207 (use "git commit --amend" to amend the current commit) ··· 233 233 cat >expected <<EOF && 234 234 interactive rebase in progress; onto $ONTO 235 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 238 Next command to do (1 remaining command): 239 - pick $COMMIT4 four_split 239 + pick $COMMIT4 # four_split 240 240 (use "git rebase --edit-todo" to view and edit) 241 241 You are currently splitting a commit while rebasing branch '\''split_commit'\'' on '\''$ONTO'\''. 242 242 (Once your working directory is clean, run "git rebase --continue") ··· 271 271 cat >expected <<EOF && 272 272 interactive rebase in progress; onto $ONTO 273 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 276 (see more in file .git/rebase-merge/done) 277 277 No commands remaining. 278 278 You are currently editing a commit while rebasing branch '\''amend_last'\'' on '\''$ONTO'\''. ··· 309 309 cat >expected <<EOF && 310 310 interactive rebase in progress; onto $ONTO 311 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 314 Next command to do (1 remaining command): 315 - pick $COMMIT4 four_edits 315 + pick $COMMIT4 # four_edits 316 316 (use "git rebase --edit-todo" to view and edit) 317 317 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 318 318 (use "git commit --amend" to amend the current commit) ··· 340 340 cat >expected <<EOF && 341 341 interactive rebase in progress; onto $ONTO 342 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 345 Next command to do (1 remaining command): 346 - pick $COMMIT4 four_edits 346 + pick $COMMIT4 # four_edits 347 347 (use "git rebase --edit-todo" to view and edit) 348 348 You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 349 349 (Once your working directory is clean, run "git rebase --continue") ··· 375 375 cat >expected <<EOF && 376 376 interactive rebase in progress; onto $ONTO 377 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 380 Next command to do (1 remaining command): 381 - pick $COMMIT4 four_edits 381 + pick $COMMIT4 # four_edits 382 382 (use "git rebase --edit-todo" to view and edit) 383 383 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 384 384 (use "git commit --amend" to amend the current commit) ··· 406 406 cat >expected <<EOF && 407 407 interactive rebase in progress; onto $ONTO 408 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 411 Next command to do (1 remaining command): 412 - pick $COMMIT4 four_edits 412 + pick $COMMIT4 # four_edits 413 413 (use "git rebase --edit-todo" to view and edit) 414 414 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 415 415 (use "git commit --amend" to amend the current commit) ··· 438 438 cat >expected <<EOF && 439 439 interactive rebase in progress; onto $ONTO 440 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 443 Next command to do (1 remaining command): 444 - pick $COMMIT4 four_edits 444 + pick $COMMIT4 # four_edits 445 445 (use "git rebase --edit-todo" to view and edit) 446 446 You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 447 447 (Once your working directory is clean, run "git rebase --continue") ··· 474 474 cat >expected <<EOF && 475 475 interactive rebase in progress; onto $ONTO 476 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 479 Next command to do (1 remaining command): 480 - pick $COMMIT4 four_edits 480 + pick $COMMIT4 # four_edits 481 481 (use "git rebase --edit-todo" to view and edit) 482 482 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 483 483 (use "git commit --amend" to amend the current commit) ··· 507 507 cat >expected <<EOF && 508 508 interactive rebase in progress; onto $ONTO 509 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 512 Next command to do (1 remaining command): 513 - pick $COMMIT4 four_edits 513 + pick $COMMIT4 # four_edits 514 514 (use "git rebase --edit-todo" to view and edit) 515 515 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 516 516 (use "git commit --amend" to amend the current commit) ··· 541 541 cat >expected <<EOF && 542 542 interactive rebase in progress; onto $ONTO 543 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 546 Next command to do (1 remaining command): 547 - pick $COMMIT4 four_edits 547 + pick $COMMIT4 # four_edits 548 548 (use "git rebase --edit-todo" to view and edit) 549 549 You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 550 550 (Once your working directory is clean, run "git rebase --continue") ··· 579 579 cat >expected <<EOF && 580 580 interactive rebase in progress; onto $ONTO 581 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 584 Next command to do (1 remaining command): 585 - pick $COMMIT4 four_edits 585 + pick $COMMIT4 # four_edits 586 586 (use "git rebase --edit-todo" to view and edit) 587 587 You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''. 588 588 (use "git commit --amend" to amend the current commit) ··· 997 997 cat >expected <<EOF && 998 998 interactive rebase in progress; onto $ONTO 999 999 Last commands done (2 commands done): 1000 - pick $COMMIT2 two_commit 1000 + pick $COMMIT2 # two_commit 1001 1001 exec exit 15 1002 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 1005 (use "git rebase --edit-todo" to view and edit) 1006 1006 You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''. 1007 1007 (use "git commit --amend" to amend the current commit) ··· 1025 1025 cat >expected <<EOF && 1026 1026 interactive rebase in progress; onto $ONTO 1027 1027 Last commands done (3 commands done): 1028 - pick $COMMIT2 two_commit 1028 + pick $COMMIT2 # two_commit 1029 1029 exec exit 15 1030 1030 (see more in file .git/rebase-merge/done) 1031 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 1034 (use "git rebase --edit-todo" to view and edit) 1035 1035 You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''. 1036 1036 (use "git commit --amend" to amend the current commit) ··· 1050 1050 On branch several_commits 1051 1051 No commands done. 1052 1052 Next command to do (1 remaining command): 1053 - pick $COMMIT four_commit 1053 + pick $COMMIT # four_commit 1054 1054 (use "git rebase --edit-todo" to view and edit) 1055 1055 You are currently editing a commit while rebasing branch '\''several_commits'\'' on '\''$ONTO'\''. 1056 1056 (use "git commit --amend" to amend the current commit)