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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 10, 2016, 18:36 UTC
Message-ID
<xmqq60p0f3un.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACsJy8DGvyWz2_VBsEfmDWOPGUGAUhKYhCa1qLEMcOdn83ocSQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 8 quoted lines
>> I think there are some pros and some cons for relative path and absolute path.
>> Maybe append a "--relative" option with `git worktree add` ?
>>
>> I've converted all path to relative and all work with success.
>>
>> What do you think to append this --relative option.
>
> Patches are welcome.
Hmm, are they really welcome? 

Is an invocation of "git worktree add" really the right point in the workflow to decide if these references to other repositories should be relative or absolute? When you are moving referrer, it is more convenient if the reference uses absolute path to name the referrent. When you are moving both referrer and referrent, it is more convenient to use relative.

I somehow doubt that users know which future move they would be making when doing "git worktree add".

To me, this almost looks like a need for a new subcommand to "git worktree" that lets you move existing worktree to elsewhere, or turn absolute reference to relative and vice versa.

Previous: Stéphane KleinNext: Duy Nguyen
Message 7 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.