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

Re: [PATCH] require_work_tree broken with NONGIT_OK

From
Gabriel Filion <lelutin@gmail.com>
Date
Feb 15, 2010, 15:14 UTC
Message-ID
<4B7964D6.1030403@gmail.com>
In-Reply-To
<20100215074922.GA5549@coredump.intra.peff.net>
On 2010-02-15 02:49, Jeff King wrote:
> 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.
> 

I hit this bug while working on a script called git-bzr over at http://github.com/kfish/git-bzr when trying to use git-sh-setup to avoid reinventing the wheel.

Most commands in there need to be run inside a git repository and some don't. I was trying find out how to implemnt "git bzr clone", which for obvious reasons should not require a work tree..

plus, I thought requiring presence in a work tree to display help messages was not a very user-friendly concept (this was git-bzr's behaviour some days ago).

I'm thinking of changing things to use git-sh-setup by splitting the script into non-work-tree-requiring commands in the main script and commands requiring a work tree in another sub-script.

Well, all this to simply illustrate possible use cases.

I'll surely be opening another discussion about git-bzr pretty soon to see if people would be interested in helping out.

thanks again to both of you.
-- 
Gabriel Filion
Previous: Jeff King
Message 6 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.