]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t9800: correct misuse of 'show -s --raw' in a test
authorJunio C Hamano <gitster@pobox.com>
Sat, 6 May 2023 21:29:55 +0000 (14:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 6 May 2023 21:30:51 +0000 (14:30 -0700)
There is $(git show -s --raw --pretty=format:%at HEAD) in this test
that is meant to grab the author time of the commit.  We used to
have a bug in the command line option parser of the diff family of
commands, where "show -s --raw" was identical to "show -s".

With the "-s" bug fixed, "show -s --raw" would mean the same thing
as "show --raw", i.e. show the output from the diff machinery in the
"raw" format.  And this test will start failing, so fix it before
that happens.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9800-git-p4-basic.sh

index dc88d0e064931aab48a3e93002cc67416090282c..a4b3cb94929c9cddfdb5a751f39b42acdb2529ab 100755 (executable)
@@ -330,7 +330,7 @@ test_expect_success 'initial import time from top change time' '
        test_when_finished cleanup_git &&
        (
                cd "$git" &&
-               gittime=$(git show -s --raw --pretty=format:%at HEAD) &&
+               gittime=$(git show -s --pretty=format:%at HEAD) &&
                echo $p4time $gittime &&
                test $p4time = $gittime
        )