Re: [PATCH] rev-parse: fix --git-common-dir when executed from subpath of main tree
- From
Mike Hommey <mh@glandium.org>
- Date
- May 19, 2016, 08:50 UTC
- Message-ID
- <20160519085049.GA26914@glandium.org>
- In-Reply-To
- <1459734143-95832-1-git-send-email-rappazzo@gmail.com>
On Sun, Apr 03, 2016 at 09:42:23PM -0400, Michael Rappazzo wrote:
Show 5 quoted lines
> Executing `git-rev-parse --git-common-dir` from the root of the main > worktree results in '.git', which is the relative path to the git dir. > When executed from a subpath of the main tree it returned somthing like: > 'sub/path/.git'. Change this to return the proper relative path to the > git directory (similar to `--show-cdup`).
Note that `git rev-parse --git-dir` returns an absolute path, not a relative one. Shouldn't --git-common-dir "simply" return the same as --git-dir when not in a worktree?
Mike