git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / 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: Sat, 25 Jan 2020 22:22:45 +0000	[thread overview]
Message-ID: <TU4PR8401MB1117E8EEB853728B0392D83CF9090@TU4PR8401MB1117.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20200125195319.GA5519@coredump.intra.peff.net>

> 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.
Pre-commit hook when worktrees are used? 

pre-commit
#!/bin/bash
env | grep GIT

/tmp/pre_commit_test_worktree  (new_branch)$ git add frob
/tmp/pre_commit_test_worktree  (new_branch)$ git commit -m "frob"
GIT_DIR=/tmp/pre_commit_test/.git/worktrees/pre_commit_test_worktree
GIT_EDITOR=:
GIT_INDEX_FILE=/tmp/pre_commit_test/.git/worktrees/pre_commit_test_worktree/index
GIT_PREFIX=
GIT_AUTHOR_DATE=@1579990789 -0800
GIT_AUTHOR_NAME=Andrew Crabtree
GIT_EXEC_PATH=/usr/local/libexec/git-core
GIT_AUTHOR_EMAIL=andrew.crabtree@hpe.com
[new_branch 7b1b747] frob
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 frob

  reply	other threads:[~2020-01-25 22:22 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 [this message]
2020-01-30 10:29         ` Jeff King
2020-01-30 21:59           ` Crabtree, Andrew
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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=TU4PR8401MB1117E8EEB853728B0392D83CF9090@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).