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 Rappazzo <rappazzo@gmail.com>
Date
Apr 8, 2016, 12:35 UTC
Message-ID
<CANoM8SWCiJch-nXq=-=ELKOc6tV-TNg6U-hcc9W69Fz4rz+j+g@mail.gmail.com>
In-Reply-To
<CACsJy8CgNy8+s0j+UUVVDk1ru702mtkTrO6QsYNpisGY-eAYGw@mail.gmail.com>
On Fri, Apr 8, 2016 at 7:47 AM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 13 quoted lines
> 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.
Previous: Duy NguyenNext: Mike Hommey
Message 4 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.