* [PATCH] t0091: allow test in a repository without tags
@ 2024-01-30 19:03 Junio C Hamano
2024-01-30 20:53 ` Eric Sunshine
2024-02-05 10:07 ` Martin Ågren
0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2024-01-30 19:03 UTC (permalink / raw)
To: git; +Cc: Martin Ågren
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 build 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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git c/t/t0091-bugreport.sh w/t/t0091-bugreport.sh
index 8798feefe3..fca39048fe 100755
--- c/t/t0091-bugreport.sh
+++ w/t/t0091-bugreport.sh
@@ -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.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] t0091: allow test in a repository without tags
2024-01-30 19:03 [PATCH] t0091: allow test in a repository without tags Junio C Hamano
@ 2024-01-30 20:53 ` Eric Sunshine
2024-01-30 21:46 ` Junio C Hamano
2024-02-05 10:07 ` Martin Ågren
1 sibling, 1 reply; 5+ messages in thread
From: Eric Sunshine @ 2024-01-30 20:53 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Martin Ågren
On Tue, Jan 30, 2024 at 2:03 PM Junio C Hamano <gitster@pobox.com> wrote:
> 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 build in a repository cloned
s/build/built/
> without tags, for example, "git version unknown.g00000000" can be a
> legit version string.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] t0091: allow test in a repository without tags
2024-01-30 20:53 ` Eric Sunshine
@ 2024-01-30 21:46 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2024-01-30 21:46 UTC (permalink / raw)
To: Eric Sunshine; +Cc: git, Martin Ågren
Eric Sunshine <sunshine@sunshineco.com> writes:
> On Tue, Jan 30, 2024 at 2:03 PM Junio C Hamano <gitster@pobox.com> wrote:
>> 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 build in a repository cloned
>
> s/build/built/
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] t0091: allow test in a repository without tags
2024-01-30 19:03 [PATCH] t0091: allow test in a repository without tags Junio C Hamano
2024-01-30 20:53 ` Eric Sunshine
@ 2024-02-05 10:07 ` Martin Ågren
2024-02-06 18:33 ` Junio C Hamano
1 sibling, 1 reply; 5+ messages in thread
From: Martin Ågren @ 2024-02-05 10:07 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Tue, 30 Jan 2024 at 20:03, Junio C Hamano <gitster@pobox.com> wrote:
>
> 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 build in a repository cloned
> without tags, for example, "git version unknown.g00000000" can be a
> legit version string.
I've tried reproducing this along the lines of
git clone --no-tags <url>
cd git
make
(cd t && ./t0091-*)
but this works for me on current master, 2a540e432f ("The thirteenth
batch", 2024-02-02), which doesn't have this patch.
GIT-VERSION-GEN seems to be careful to only use tags on the wanted form.
My build generates a git version of "2.43.GIT", no "unknown..." stuff.
I don't doubt that you've hit this, I just wonder which piece of the
puzzle I'm missing.
> - # The beginning should match "git version --build-info" verbatim,
> + # The beginning should match "git version --build-options" verbatim,
Correct, my thinko-typo, thanks for correcting.
> # but rather than checking bit-for-bit equality, just test some basics.
> - grep "git version [0-9]." system &&
> + grep "git version " system &&
This matches the commit message, ok.
Martin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] t0091: allow test in a repository without tags
2024-02-05 10:07 ` Martin Ågren
@ 2024-02-06 18:33 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2024-02-06 18:33 UTC (permalink / raw)
To: Martin Ågren; +Cc: git
Martin Ågren <martin.agren@gmail.com> writes:
> GIT-VERSION-GEN seems to be careful to only use tags on the wanted form.
> My build generates a git version of "2.43.GIT", no "unknown..." stuff.
>
> I don't doubt that you've hit this, I just wonder which piece of the
> puzzle I'm missing.
I wonder that too.
I was experimenting with "seen" with the reftable. I first created
a new and empty repository with "git init --ref-format=reftable" in
a brand new directory next to my primary working area, and then did
"git fetch --no-tags ../git.git/ master" or something to pull the
history without tags in. After that I thought I was careful to make
sure I only ran the "seen" version of Git (all my other installations
of Git are unaware of reftable, and the version of Git on my regular
$PATH is not from the "seen" branch), but perhaps I screwed up at
some point and the mistake got stuck in the version file, or something
silly like that, perhaps.
>
>> - # The beginning should match "git version --build-info" verbatim,
>> + # The beginning should match "git version --build-options" verbatim,
>
> Correct, my thinko-typo, thanks for correcting.
>
>> # but rather than checking bit-for-bit equality, just test some basics.
>> - grep "git version [0-9]." system &&
>> + grep "git version " system &&
>
> This matches the commit message, ok.
>
> Martin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-06 18:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 19:03 [PATCH] t0091: allow test in a repository without tags Junio C Hamano
2024-01-30 20:53 ` Eric Sunshine
2024-01-30 21:46 ` Junio C Hamano
2024-02-05 10:07 ` Martin Ågren
2024-02-06 18:33 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).