@@ -1468,7 +1468,7 @@ test_expect_success 'rebase -i respects rebase.missingCommitsCheck = warn' '
14681468 cat >expect <<-EOF &&
14691469 Warning: some commits may have been dropped accidentally.
14701470 Dropped commits (newer to older):
1471- - $(git rev-list --pretty=oneline --abbrev-commit -1 primary)
1471+ - $(git log --format="%h # %s" -1 primary)
14721472 To avoid this message, use "drop" to explicitly remove a commit.
14731473 EOF
14741474 test_config rebase.missingCommitsCheck warn &&
@@ -1486,8 +1486,8 @@ test_expect_success 'rebase -i respects rebase.missingCommitsCheck = error' '
14861486 cat >expect <<-EOF &&
14871487 Warning: some commits may have been dropped accidentally.
14881488 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)
14911491 To avoid this message, use "drop" to explicitly remove a commit.
14921492
14931493 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
15301530test_expect_success ' rebase --edit-todo respects rebase.missingCommitsCheck = warn' '
15311531 cat >expect <<-EOF &&
15321532 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)
15341534 Warning: some commits may have been dropped accidentally.
15351535 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)
15381538 To avoid this message, use "drop" to explicitly remove a commit.
15391539 EOF
15401540 head -n5 expect >expect.2 &&
@@ -1565,11 +1565,11 @@ test_expect_success 'rebase --edit-todo respects rebase.missingCommitsCheck = wa
15651565test_expect_success ' rebase --edit-todo respects rebase.missingCommitsCheck = error' '
15661566 cat >expect <<-EOF &&
15671567 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)
15691569 Warning: some commits may have been dropped accidentally.
15701570 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)
15731573 To avoid this message, use "drop" to explicitly remove a commit.
15741574
15751575 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
16421642 test_commit "fixup! first" file2.txt "first line again" first_fixup &&
16431643 test_commit "squash! second" file1.txt "another line here" second_squash &&
16441644 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
16471647 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
16501650 x git show HEAD
16511651 EOF
16521652 git checkout abbrevcmd &&
@@ -1665,7 +1665,7 @@ test_expect_success 'static check of bad command' '
16651665 set_fake_editor &&
16661666 test_must_fail env FAKE_LINES="1 2 3 bad 4 5" \
16671667 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)" \
16691669 actual &&
16701670 test_grep "You can fix this with .git rebase --edit-todo.." \
16711671 actual &&
@@ -1865,15 +1865,15 @@ test_expect_success '--update-refs adds label and update-ref commands' '
18651865 set_cat_todo_editor &&
18661866
18671867 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
18701870 update-ref refs/heads/second
18711871 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
18751875 update-ref refs/heads/third
1876- pick $(git log -1 --format=%h M) M
1876+ pick $(git log -1 --format=%h M) # M
18771877 update-ref refs/heads/no-conflict-branch
18781878 update-ref refs/heads/is-not-reordered
18791879 update-ref refs/heads/shared-tip
@@ -1905,19 +1905,19 @@ test_expect_success '--update-refs adds commands with --rebase-merges' '
19051905 cat >expect <<-EOF &&
19061906 label onto
19071907 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
19101910 update-ref refs/heads/branch2
19111911 label branch2
19121912 reset onto
1913- pick $(git log -1 --format=%h refs/heads/second) J
1913+ pick $(git log -1 --format=%h refs/heads/second) # J
19141914 update-ref refs/heads/second
19151915 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
19191919 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
19211921 update-ref refs/heads/no-conflict-branch
19221922 merge -C $(git log -1 --format=%h HEAD~1) branch2 # merge
19231923 update-ref refs/heads/merge-branch
0 commit comments