git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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, 07:49 UTC
Message-ID
<20160519074939.GA22796@glandium.org>
In-Reply-To
<CANoM8SWCiJch-nXq=-=ELKOc6tV-TNg6U-hcc9W69Fz4rz+j+g@mail.gmail.com>
On Fri, Apr 08, 2016 at 08:35:51AM -0400, Mike Rappazzo wrote:
Show 16 quoted lines
> On Fri, Apr 8, 2016 at 7:47 AM, Duy Nguyen <pclouds@gmail.com> wrote:
> > On Mon, Apr 4, 2016 at 8:42 AM, Michael Rappazzo <rappazzo@gmail.com> wrote:
> >> 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`).
> >
> > I faced a similar problem just a couple days ago, I expected "git
> > rev-parse --git-path" to return a path relative to cwd too, but it
> > returned relative to git dir. The same solution (or Eric's, which is
> > cleaner in my opinion) applies. --shared-index-path also does
> > puts(git_path(... and has the same problem. Do you want to fix them
> > too?
> 
> Sure, I can do that.  I will try to get it up soon.

If I'm not mistaken, it looks like this fell off your radar. (I haven't seen an updated patch, and it doesn't look like the fix made it to any git branch). Would you mind updating?

Cheers,
Mike
Previous: Mike RappazzoNext: Mike Rappazzo
Message 5 of 7 in “rev-parse: fix --git-common-dir when executed from subpath of main tree”
  1. rev-parse: fix --git-common-dir when executed from subpath of main treeMichael Rappazzo, Apr 4, 2016
  2. Eric SunshineApr 4, 2016
  3. Duy NguyenApr 8, 2016
  4. Mike RappazzoApr 8, 2016
  5. Mike HommeyMay 19, 2016
  6. Mike RappazzoMay 19, 2016
  7. Mike HommeyMay 19, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.