Re: [PATCH 03/11] t3407: use test_cmp_rev
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 8, 2021, 10:40 UTC
- Message-ID
- <87ilzbic3l.fsf@evledraar.gmail.com>
- In-Reply-To
- <dfa27d7a8e7e0a9e03e228653ebff639a449ac77.1631094563.git.gitgitgadget@gmail.com>
On Wed, Sep 08 2021, Phillip Wood via GitGitGadget wrote:
Show 6 quoted lines
> @@ -54,9 +54,9 @@ testrebase() {
> echo d >> a &&
> git add a &&
> test_must_fail git rebase --continue &&
> - test $(git rev-parse HEAD) != $(git rev-parse main) &&
> + ! test_cmp_rev HEAD main &&Use "test_cmp_rev !", making the shell do the negation is troublesome for the same reason we don't do it with git command, it potentially hides segfaults (and that test helper invokes "git", hence the optional "!" first rgument).