git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t/test-lib: print pretty msg when git isn't built

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 18, 2012, 08:00 UTC
Message-ID
<7vr4pzoj5a.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0kbeLtU-5_9QnmQKS1yO02SvCW3ERvami9bmCa0Vym8oQ@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 26 quoted lines
> Hi,
>
> Junio C Hamano wrote:
>> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>>
>>> Hi Junio,
>>>
>>> Junio C Hamano wrote:
>>>> Is this a sufficient replacement for what you removed from 0000?
>>>> Can the BUILD-OPTIONS file exist when your build of git failed?
>>>
>>> Oops, I didn't realize that BUILD-OPTIONS would be written when the
>>> build fails.  How about something like this instead:
>>
>> Yeah, but why change it so much?  Wouldn't writing
>>
>>         "$GIT_BUILD_DIR/git" >/dev/null
>>         if test $? != 1
>>         then
>>                 : You haven't built git!
>>         fi
>>
>> just like the original in 0000 be sufficient??
>
> Because that emits an ugly
> ./test-lib.sh: 54: /home/artagnon/src/git/t/../git: not found
Don't you deserve it? ;-)
The full message would read
    ./test-lib.sh: 54: /home/artagnon/src/git/t/../git: not found
    error: you do not seem to have built git yet.

which looks perfectly sensible to me. It makes it clear where on the filesystem the test script expects your "git", which is an added benefit.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 7 of 12 in “t/perf: add "trash directory" to .gitignore”
  1. t/perf: add "trash directory" to .gitignoreRamkumar Ramachandra, Sep 17, 2012
  2. t/test-lib: print pretty msg when git isn't builtRamkumar Ramachandra, Sep 17, 2012
  3. Junio C HamanoSep 17, 2012
  4. Ramkumar RamachandraSep 18, 2012
  5. Junio C HamanoSep 18, 2012
  6. Ramkumar RamachandraSep 18, 2012
  7. Junio C HamanoSep 18, 2012
  8. Ramkumar RamachandraSep 18, 2012
  9. Junio C HamanoSep 18, 2012
  10. Junio C HamanoSep 18, 2012
  11. Junio C HamanoSep 17, 2012
  12. Ramkumar RamachandraSep 18, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.