git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Crabtree, Andrew" <andrew.crabtree@hpe.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: RE: Inconsistent results from git rev-parse --show-toplevel
Date: Thu, 30 Jan 2020 21:59:31 +0000	[thread overview]
Message-ID: <TU4PR8401MB111777B793EA9C3D5336CE26F9040@TU4PR8401MB1117.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20200130102933.GE840531@coredump.intra.peff.net>

From: Jeff King [mailto:peff@peff.net] 
Sent: Thursday, January 30, 2020 2:30 AM
To: Crabtree, Andrew <andrew.crabtree@hpe.com>
Cc: Junio C Hamano <gitster@pobox.com>; git@vger.kernel.org
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@gmail.com>
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@gmail.com>
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.

  reply	other threads:[~2020-01-30 22:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 18:07 Inconsistent results from git rev-parse --show-toplevel Crabtree, Andrew
2020-01-24 19:59 ` Junio C Hamano
2020-01-25 19:31   ` Crabtree, Andrew
2020-01-25 19:53     ` Jeff King
2020-01-25 22:22       ` Crabtree, Andrew
2020-01-30 10:29         ` Jeff King
2020-01-30 21:59           ` Crabtree, Andrew [this message]
2020-02-14  6:36             ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TU4PR8401MB111777B793EA9C3D5336CE26F9040@TU4PR8401MB1117.NAMPRD84.PROD.OUTLOOK.COM \
    --to=andrew.crabtree@hpe.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).