Re: [PATCH v4 2/2] rev-parse: fix some options when executed from subpath of main tree

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

 



On Thu, May 26, 2016 at 07:19:16AM -0400, Michael Rappazzo wrote:
> Executing `git-rev-parse` with `--git-common-dir`, `--git-path <path>`,
> or `--shared-index-path` from the root of the main worktree results in
> a relative path to the git dir.
> 
> When executed from a subdirectory of the main tree, it can incorrectly
> return a path which starts 'sub/path/.git'.  Change this to return the
> proper relative path to the git directory.
> 
> Related tests marked to expect failure are updated to expect success

As mentioned previously (but late in the thread), I don't get why this
one case of --git-common-dir should not return the same thing as
--git-dir, which is an absolute directory. Especially when there is
other flag telling you whether you are in the main or another worktree,
so comparing the output for --git-dir and --git-common-dir is the
easiest way to do so, but then you have to normalize them on their own
because git returns different values pointing to the same directory.

Mike
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]