]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t0091: allow test in a repository without tags
authorJunio C Hamano <gitster@pobox.com>
Tue, 30 Jan 2024 19:03:24 +0000 (11:03 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Jan 2024 21:32:41 +0000 (13:32 -0800)
The beginning of the [System Info] section, which should match the
"git version --build-options" output, may not identify our version
as "git version 2.whatever".  When built in a repository cloned
without tags, for example, "git version unknown.g00000000" can be a
legit version string.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0091-bugreport.sh

index f6998269beb4fea3f68f14ffae22b541a066e6b3..fb2f053fc4c2ba72099304fc544f820341c34e8d 100755 (executable)
@@ -39,9 +39,9 @@ test_expect_success 'sanity check "System Info" section' '
 
        sed -ne "/^\[System Info\]$/,/^$/p" <git-bugreport-format.txt >system &&
 
-       # The beginning should match "git version --build-info" verbatim,
+       # The beginning should match "git version --build-options" verbatim,
        # but rather than checking bit-for-bit equality, just test some basics.
-       grep "git version [0-9]." system &&
+       grep "git version " system &&
        grep "shell-path: ." system &&
 
        # After the version, there should be some more info.