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

Re: [PATCH] git rev-parse: Fix --show-cdup inside symlinked directory

From
YOYves Orton <yves.orton@booking.com>
Date
Jul 15, 2008, 16:58 UTC
Message-ID
<1216141099.19334.196.camel@gemini>
In-Reply-To
<1216140100.19334.189.camel@gemini>
On Tue, 2008-07-15 at 18:41 +0200, Yves Orton wrote:
Show 14 quoted lines
> On Tue, 2008-07-15 at 17:40 +0200, Petr Baudis wrote:
> > 
> >   P.S.: Either way, there is a possible workaround to tell git about the
> > working directory manually using git --work-tree=... that I missed to
> > mention on IRC, Yves.
> 
> Hmm, am i using it wrong then?
> 
> [dmq@somewhere apps]$ git-rev-parse --git-dir
> /home/dmq/git_tree/main/.git
> [dmq@somewhere apps]$ git --work-tree="$(git-rev-parse --git-dir)" pull
> --rebase
> /usr/bin/git-sh-setup: line 139: cd: .git: No such file or directory
> Unable to determine absolute path of git directory
Hmm, realizing that was the workdir it wanted i tried it like so:

[dmq@somewhere apps]$ git --work-tree="$(git-rev-parse --git-dir)/.." pull --rebase /usr/bin/git-sh-setup: line 139: cd: /home/dmq/git_tree/main/apps/.git: No such file or directory Unable to determine absolute path of git directory

Yet:

[dmq@somewhere apps]$ git-rev-parse --git-dir /home/dmq/git_tree/main/.git

is correct.
> cheers,
> yves
> ps: not on list, please cc me on replies (sorry for the hassle)
> 
Previous: Yves OrtonNext: Rogan Dawes
Message 6 of 8 in “git-rev-parse --show-cdup returns a relative path instead of absolute (problem with git pull --rebase not finding the git dir)”
  1. Yves OrtonJul 15, 2008
  2. git rev-parse: Fix --show-cdup inside symlinked directoryPetr Baudis, Jul 15, 2008
  3. Johannes SchindelinJul 15, 2008
  4. Petr BaudisJul 15, 2008
  5. Yves OrtonJul 15, 2008
  6. Yves OrtonJul 15, 2008
  7. Rogan DawesJul 15, 2008
  8. Yves OrtonJul 15, 2008

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.