{"thread":{"id":"60818","subject":"[PATCH] t0091: allow test in a repository without tags","startedAt":"2024-01-30T19:03:30Z","lastAt":"2024-02-06T18:33:32Z","messageCount":5,"participants":["Junio C Hamano","Eric Sunshine","Martin Ågren"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"487606","messageId":"xmqqv87aabk3.fsf@gitster.g","threadId":"60818","inReplyTo":null,"subject":"[PATCH] t0091: allow test in a repository without tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-01-30T19:03:24Z","receivedAt":"2024-01-30T19:03:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The beginning of the [System Info] section, which should match the\n\"git version --build-options\" output, may not identify our version\nas \"git version 2.whatever\".  When build in a repository cloned\nwithout tags, for example, \"git version unknown.g00000000\" can be a\nlegit version string.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t0091-bugreport.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git c/t/t0091-bugreport.sh w/t/t0091-bugreport.sh\nindex 8798feefe3..fca39048fe 100755\n--- c/t/t0091-bugreport.sh\n+++ w/t/t0091-bugreport.sh\n@@ -39,9 +39,9 @@ test_expect_success 'sanity check \"System Info\" section' '\n \n \tsed -ne \"/^\\[System Info\\]$/,/^$/p\" <git-bugreport-format.txt >system &&\n \n-\t# The beginning should match \"git version --build-info\" verbatim,\n+\t# The beginning should match \"git version --build-options\" verbatim,\n \t# but rather than checking bit-for-bit equality, just test some basics.\n-\tgrep \"git version [0-9].\" system &&\n+\tgrep \"git version \" system &&\n \tgrep \"shell-path: .\" system &&\n \n \t# After the version, there should be some more info.\n"},{"id":"487611","messageId":"CAPig+cSmSjifRXsotTrdjjFsh0N4w+BzbZXKffPyn_rpirBVUw@mail.gmail.com","threadId":"60818","inReplyTo":"xmqqv87aabk3.fsf@gitster.g","subject":"Re: [PATCH] t0091: allow test in a repository without tags","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-01-30T20:53:08Z","receivedAt":"2024-01-30T20:53:20Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Jan 30, 2024 at 2:03 PM Junio C Hamano <gitster@pobox.com> wrote:\n> The beginning of the [System Info] section, which should match the\n> \"git version --build-options\" output, may not identify our version\n> as \"git version 2.whatever\".  When build in a repository cloned\n\ns/build/built/\n\n> without tags, for example, \"git version unknown.g00000000\" can be a\n> legit version string.\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n"},{"id":"487613","messageId":"xmqqmssma413.fsf@gitster.g","threadId":"60818","inReplyTo":"CAPig+cSmSjifRXsotTrdjjFsh0N4w+BzbZXKffPyn_rpirBVUw@mail.gmail.com","subject":"Re: [PATCH] t0091: allow test in a repository without tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-01-30T21:46:00Z","receivedAt":"2024-01-30T21:46:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Tue, Jan 30, 2024 at 2:03 PM Junio C Hamano <gitster@pobox.com> wrote:\n>> The beginning of the [System Info] section, which should match the\n>> \"git version --build-options\" output, may not identify our version\n>> as \"git version 2.whatever\".  When build in a repository cloned\n>\n> s/build/built/\n\nThanks.\n"},{"id":"487923","messageId":"CAN0heSrX8zQnfk_abtgBreoc=a8Z+7E-jEHHUFmu6740L8p2Lw@mail.gmail.com","threadId":"60818","inReplyTo":"xmqqv87aabk3.fsf@gitster.g","subject":"Re: [PATCH] t0091: allow test in a repository without tags","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2024-02-05T10:07:16Z","receivedAt":"2024-02-05T10:07:28Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Tue, 30 Jan 2024 at 20:03, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> The beginning of the [System Info] section, which should match the\n> \"git version --build-options\" output, may not identify our version\n> as \"git version 2.whatever\".  When build in a repository cloned\n> without tags, for example, \"git version unknown.g00000000\" can be a\n> legit version string.\n\nI've tried reproducing this along the lines of\n\n  git clone --no-tags <url>\n  cd git\n  make\n  (cd t && ./t0091-*)\n\nbut this works for me on current master, 2a540e432f (\"The thirteenth\nbatch\", 2024-02-02), which doesn't have this patch.\n\nGIT-VERSION-GEN seems to be careful to only use tags on the wanted form.\nMy build generates a git version of \"2.43.GIT\", no \"unknown...\" stuff.\n\nI don't doubt that you've hit this, I just wonder which piece of the\npuzzle I'm missing.\n\n> -       # The beginning should match \"git version --build-info\" verbatim,\n> +       # The beginning should match \"git version --build-options\" verbatim,\n\nCorrect, my thinko-typo, thanks for correcting.\n\n>         # but rather than checking bit-for-bit equality, just test some basics.\n> -       grep \"git version [0-9].\" system &&\n> +       grep \"git version \" system &&\n\nThis matches the commit message, ok.\n\nMartin\n"},{"id":"488081","messageId":"xmqqeddpigsm.fsf@gitster.g","threadId":"60818","inReplyTo":"CAN0heSrX8zQnfk_abtgBreoc=a8Z+7E-jEHHUFmu6740L8p2Lw@mail.gmail.com","subject":"Re: [PATCH] t0091: allow test in a repository without tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-06T18:33:29Z","receivedAt":"2024-02-06T18:33:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Ågren <martin.agren@gmail.com> writes:\n\n> GIT-VERSION-GEN seems to be careful to only use tags on the wanted form.\n> My build generates a git version of \"2.43.GIT\", no \"unknown...\" stuff.\n>\n> I don't doubt that you've hit this, I just wonder which piece of the\n> puzzle I'm missing.\n\nI wonder that too.\n\nI was experimenting with \"seen\" with the reftable.  I first created\na new and empty repository with \"git init --ref-format=reftable\" in\na brand new directory next to my primary working area, and then did\n\"git fetch --no-tags ../git.git/ master\" or something to pull the\nhistory without tags in.  After that I thought I was careful to make\nsure I only ran the \"seen\" version of Git (all my other installations\nof Git are unaware of reftable, and the version of Git on my regular\n$PATH is not from the \"seen\" branch), but perhaps I screwed up at\nsome point and the mistake got stuck in the version file, or something\nsilly like that, perhaps.\n\n>\n>> -       # The beginning should match \"git version --build-info\" verbatim,\n>> +       # The beginning should match \"git version --build-options\" verbatim,\n>\n> Correct, my thinko-typo, thanks for correcting.\n>\n>>         # but rather than checking bit-for-bit equality, just test some basics.\n>> -       grep \"git version [0-9].\" system &&\n>> +       grep \"git version \" system &&\n>\n> This matches the commit message, ok.\n>\n> Martin\n"}]}