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

Re: Feature request: use relative path in worktree config files

From
Stéphane Klein <contact@stephane-klein.info>
Date
Oct 8, 2016, 19:54 UTC
Message-ID
<CADKxhpcKOX4RkpbkA8t_6MUh3DttPgwA-YquMkuHkS3C2FR6xg@mail.gmail.com>
In-Reply-To
<CADKxhpe3S4L9CPV9yxh2yhrtJMa9wyZAPC45u_S=RiuzY1Xrkg@mail.gmail.com>

I've write a small tool in Golang to fix this issue: https://github.com/harobed/fix-git-worktree

2016-10-08 11:35 GMT+02:00 Stéphane Klein <contact@stephane-klein.info>:
Show 25 quoted lines
> Hi,
>
> "git worktree add" write absolute path in ".git/gitdir"
>
> The code source is here
> https://git.kernel.org/cgit/git/git.git/tree/builtin/worktree.c?h=v2.10.1#n256
>
> Is it possible to use relative path in this config files:
>
> * [main_worktree]/.git/worktrees/[worktree_foobar]/gitdir
> * [worktree_foobar]/.git
>
> Why:
>
> 1. I configure worktree on my host
> 2. next I use this git working copy in Docker with volume share
> 3. next I've some git error in Docker because config files use absolute path
>
> Best regards,
> Stéphane
> --
> Stéphane Klein <contact@stephane-klein.info>
> blog: http://stephane-klein.info
> cv : http://cv.stephane-klein.info
> Twitter: http://twitter.com/klein_stephane
-- 
Stéphane Klein <contact@stephane-klein.info>
blog: http://stephane-klein.info
cv : http://cv.stephane-klein.info
Twitter: http://twitter.com/klein_stephane
Previous: Stéphane KleinNext: Duy Nguyen
Message 2 of 8 in “Feature request: use relative path in worktree config files”
  1. Stéphane KleinOct 8, 2016
  2. Stéphane KleinOct 8, 2016
  3. Duy NguyenOct 9, 2016
  4. Stéphane KleinOct 9, 2016
  5. Duy NguyenOct 9, 2016
  6. Stéphane KleinOct 9, 2016
  7. Junio C HamanoOct 10, 2016
  8. Duy NguyenOct 11, 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.