git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* `git rev-parse --git-common-dir` doesn't work in a subdirectory of the main work tree
@ 2016-02-12  3:47 Mike Hommey
  2016-02-12  4:31 ` [PATCH] rev-parse: take prefix into account in --git-common-dir Nguyễn Thái Ngọc Duy
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Hommey @ 2016-02-12  3:47 UTC (permalink / raw)
  To: git

Hi,

In a worktree, git rev-parse --git-common-dir returns the non
worktree-specific git directory. e.g. .git instead of
.git/worktrees/name. The problem is that while it returns the right
thing from a subdirectory of a worktree, it doesn't from a subdirectory
of the "main" work tree. In the latter case it returns ".git" instead
of the full path to it.

Mike

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-12  4:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12  3:47 `git rev-parse --git-common-dir` doesn't work in a subdirectory of the main work tree Mike Hommey
2016-02-12  4:31 ` [PATCH] rev-parse: take prefix into account in --git-common-dir Nguyễn Thái Ngọc Duy

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).