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

Re: [PATCH] require_work_tree broken with NONGIT_OK

From
Jeff King <peff@peff.net>
Date
Feb 15, 2010, 07:49 UTC
Message-ID
<20100215074922.GA5549@coredump.intra.peff.net>
In-Reply-To
<7vzl3bj95l.fsf@alter.siamese.dyndns.org>
On Sun, Feb 14, 2010 at 10:38:30PM -0800, Junio C Hamano wrote:
> > +	test git rev-parse --is-inside-work-tree >/dev/null 2>&1 ||
> 
> I don't think this would ever work with "test" at the beginning.
Oops. I totally missed that when reviewing the patch. :-/

Thinking on this a bit more, I think Gabriel's script is a little broken. It sets NONGIT_OK to not have a git repository, but then it requires a working tree, which doesn't make any sense.

That being said, I think it is still a good change, as the correct error message is better than the shell barfing.

-Peff
Previous: Gabriel FilionNext: Gabriel Filion
Message 5 of 6 in “require_work_tree broken with NONGIT_OK”
  1. require_work_tree broken with NONGIT_OKGabriel Filion, Feb 15, 2010
  2. Jeff KingFeb 15, 2010
  3. Junio C HamanoFeb 15, 2010
  4. Gabriel FilionFeb 15, 2010
  5. Jeff KingFeb 15, 2010
  6. Gabriel FilionFeb 15, 2010

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.