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

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

 



From: Jeff King [mailto:peff@xxxxxxxx] 
Sent: Thursday, January 30, 2020 2:30 AM
To: Crabtree, Andrew <andrew.crabtree@xxxxxxx>
Cc: Junio C Hamano <gitster@xxxxxxxxx>; git@xxxxxxxxxxxxxxx
Subject: Re: Inconsistent results from git rev-parse --show-toplevel
> > 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.

-A 


commit d95138e695d99d32dcad528a2a7974f434c51e79
Author: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
Date:   Fri Jun 26 17:37:35 2015 +0700

setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR

Which was subsequently reverted 

commit 86d26f240fcb4f287258ad459efc2b5e30e60cfd
Author: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
Date:   Sun Dec 20 14:50:18 2015 +0700

    setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..
    
    Commit d95138e [1] attempted to fix a .git file problem by
    setting GIT_WORK_TREE whenever GIT_DIR is set. It sounded harmless
    because we handle GIT_DIR and GIT_WORK_TREE side by side for most
    commands, with two exceptions: git-init and git-clone.
    
    "git clone" is not happy with d95138e.




[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