Re: [PATCH 06/15] t3432: make these tests work with either am or merge backends
From: Denton Liu <hidden>
Date: 2019-12-22 05:11:31
Hi Elijah, On Fri, Dec 20, 2019 at 05:09:39PM +0000, Elijah Newren via GitGitGadget wrote:
quoted hunk ↗ jump to hunk
diff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh index 92f95b57da..3879a43fa0 100755 --- a/t/t3432-rebase-fast-forward.sh +++ b/t/t3432-rebase-fast-forward.sh@@ -44,19 +44,16 @@ test_rebase_same_head_ () { test_expect_$status "git rebase$flag $* with $changes is $what with $cmp HEAD" " oldhead=\$(git rev-parse HEAD) && test_when_finished 'git reset --hard \$oldhead' && + cp .git/logs/HEAD expect && git rebase$flag $* >stdout && if test $what = work then - # Must check this case first, for 'is up to - # date, rebase forced[...]rewinding head' cases - test_i18ngrep 'rewinding head' stdout + wc -l .git/logs/HEAD >old && + wc -l .git/logs/HEAD >new &&
Are the above two lines some yet-to-be cleaned up leftovers? I can't see where `old` and `new` are being used elsewhere.
quoted hunk ↗ jump to hunk
+ test_line_count '-gt' $(($old + 2)) .git/logs/HEAD elif test $what = noop then - test_i18ngrep 'is up to date' stdout && - test_i18ngrep ! 'rebase forced' stdout - elif test $what = noop-force - then - test_i18ngrep 'is up to date, rebase forced' stdout + test_cmp expect .git/logs/HEAD fi && newhead=\$(git rev-parse HEAD) && if test $cmp = same