Subject: Re: [PATCH] require_work_tree broken with NONGIT_OK

From: Gabriel Filion <[email-masked]>
Date: Mon, 15 Feb 2010 10:14:30 -0500

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