Re: Inconsistent results from git rev-parse --show-toplevel

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

 



On Thu, Jan 30, 2020 at 09:59:31PM +0000, Crabtree, Andrew wrote:

> > > But the bigger thing, I think, is: who is setting GIT_DIR but not
> > > setting GIT_WORK_TREE to match? Because IMHO that's the situation
> > > that is causing the confusion.
> 
> > but it fails a test in t5601 around git-clone. 
> 
> Thanks jeff.  It looks like this might have been tried previously and
> abandoned?  I'm pretty far out of my league here in terms of how
> things are supposed to operate and any history around the previous
> attempts at making it work.
> [...]
> commit d95138e695d99d32dcad528a2a7974f434c51e79

Yeah, the commit you found was doing exactly the thing I suggested. IMHO
the right path forward is to actually fix the weirdness in git-clone. It
would be a backwards incompatibility, but a pretty obscure one. I think
we're likely to help more people than hurt by being able to handle
$GIT_WORK_TREE consistently. At least that's my gut feeling.

I guess one way to fix it without breaking compatibility would be for us
to set $GIT_WORK_TREE alongside $GIT_DIR, but _also_ set a special
$GIT_CLONE_NO_RESPECT_WORK_TREE variable that would instruct it that the
caller isn't trying to do trigger the special $GIT_WORK_TREE behavior.

But we'd have to carry that hack around forever, which doesn't excite
me.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux