Hi, On Tue, Jul 19, 2016 at 11:04:59AM -0700, Junio C Hamano wrote: > > > Adds a --name option allowing to specify the name of a worktree when > > creating it. This allows to have multiple worktrees in directories > > having the same name (e.g. project0/foo, project1/foo etc...). This > > commit keeps the previous behaviour by making it the default value, i.e. > > by using $(basename <path>) as the worktree name when the --name option > > isn't used. [...] > Hmm, is this related to an earlier discussion > > https://public-inbox.org/git/20160625051548.95564-1-barret%40brennie.ca/ > > in any way, or is it an independent invention? Completely independent. I made a quick search before doing this... too quick :-) > The conclusion of that discussion thread was roughly "users > shouldn't even _care_ about the name, and if they have to use name > to identify the worktrees to do certain things right now, reducing > the need for such 'certain things', not making it easy to give a > user-defined name to a worktree, is the way to go", IIRC. I agree that users shouldn't have to deal with this in most cases, and that's still the default behaviour with this patch. But some use cases require to change this default name: I use the same repository for each of my projects using the Linux kernel while working on them in parallel. So I end up with something like: project1/linux, project2/linux etc... where other names than 'linux' in each project directory wouldn't really make sense. Being able to manually define the name can also be useful in some (rare) cases, where you reorganize your project directory tree. But that's not a strong argument for adding this option :-) There might be other solutions, so I'm open for discussion. I just find this not-that-magic solution useful. Thanks! -- Antoine
Attachment:
signature.asc
Description: PGP signature