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

Re: [PATCH] builtin/worktree.c: add option for setting worktree name

From
Barret Rennie <barret@brennie.ca>
Date
Jun 25, 2016, 06:28 UTC
Message-ID
<58A7F9CA-05A1-4BD1-A664-5B8302BFDE2F@brennie.ca>
In-Reply-To
<xmqq60sxeqr4.fsf@gitster.mtv.corp.google.com>
This is really to scratch an itch I have when I break my worktrees and can’t figure out which worktree dir is the one I’ve broken. For example, I organize my code as follows:
projects/reviewboard/branches/<branch-name>/src/
	django/
	djblets/  
	reviewboard/
for each release branch I maintain (4 or 5 of them), where each of the above is a worktree checkout of the correct branch. This is so I have all my dependencies for the project at the right development version.
However, when I inevitably break a worktree for, e.g., Review Board, I have to figure out which of reviewboard, reviewboard1, reviewboard2, etc. it is that I’ve broken, instead of being able to just go into the worktree named for the release branch.
Hope this clarifies things.
Show 16 quoted lines
> On Jun 25, 2016, at 12:17 AM, Junio C Hamano <gitster@pobox.com> wrote:
> 
> Barret Rennie <barret@brennie.ca> writes:
> 
>> Add the --name parameter to git worktree add that allows the user to set
>> the name of the created worktree directory. A worktree must not already
>> exist with the current name or creation will fail.
> 
> Hmph.  This strongly smells like "because we can add this feature",
> not "because we need to add this feature".
> 
> What problem does it solve?  Please do not give me "currently we
> cannot give a name and instead live with the automatically given
> one, and with this patch we can give arbitrary name" as the answer.
> That is what I called "because we can".  Why is it bad that you have
> to live with the name automatically given to your new worktree?
Previous: Junio C HamanoNext: Johannes Sixt
Message 3 of 16 in “builtin/worktree.c: add option for setting worktree name”
  1. builtin/worktree.c: add option for setting worktree nameBarret Rennie, Jun 25, 2016
  2. Junio C HamanoJun 25, 2016
  3. Barret RennieJun 25, 2016
  4. Johannes SixtJun 25, 2016
  5. Barret RennieJun 25, 2016
  6. Barret RennieJun 25, 2016
  7. Junio C HamanoJun 25, 2016
  8. Barret RennieJun 25, 2016
  9. Junio C HamanoJun 26, 2016
  10. Barret RennieJun 27, 2016
  11. Junio C HamanoJun 27, 2016
  12. Eric SunshineJun 26, 2016
  13. Barret RennieJun 27, 2016
  14. Eric SunshineJun 27, 2016
  15. Barret RennieJun 29, 2016
  16. Barret RennieJun 25, 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.