Re: [RFC][PATCH] Remove wrong usage of GIT_DIR

On Sat, Apr 4, 2009 at 10:49 PM, Stephen Kennedy <stevek gnome org> wrote:
>> the usage we make of GIT_DIR environment variable in is wrong
>> this environment variable is not pointing to a vc.root directory.
> FYI this is where the patch originated
> Perhaps I messed something up in trying to use GIT_DIR
> only as a fallback.

Yes, I've read that bug report, and the proposed patches
in it. The first patch from the reporter was right, I think.
Not that I have tested it, but reading the GIT_DIR
documentation makes me think it was.

GIT_DIR is not a fallback for a wrong location, it is an
alternate path used as the ".git" metadata directory, so
it is not valid as a vc.root, GIT_WORK_TREE would
have been OK in your patch I think.

I think an analogy with svn would be:
${GIT_DIR} is equivalent to ${SVNROOT}, i.e. the
server url. (with GIT_DIR being an absolute path)

Vincent Legoll

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]