git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Antoine Tenart <antoine.tenart@ack.tf>
To: Junio C Hamano <gitster@pobox.com>
Cc: Antoine Tenart <antoine.tenart@ack.tf>,
	git@vger.kernel.org, pclouds@gmail.com, sunshine@sunshineco.com
Subject: Re: [PATCH] worktree: add: introduce the --name option
Date: Tue, 19 Jul 2016 20:45:10 +0200	[thread overview]
Message-ID: <20160719184510.GA28551@kwain> (raw)
In-Reply-To: <xmqq7fchh5bo.fsf@gitster.mtv.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-07-19 18:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 14:47 [PATCH] worktree: add: introduce the --name option Antoine Tenart
2016-07-19 18:04 ` Junio C Hamano
2016-07-19 18:23   ` Duy Nguyen
2016-07-19 18:54     ` Antoine Tenart
2016-07-19 19:04       ` Duy Nguyen
2016-07-19 19:21         ` Eric Sunshine
2016-07-19 19:35         ` Antoine Tenart
2016-07-20 14:54           ` Duy Nguyen
2016-07-20 16:12             ` Antoine Tenart
2016-07-19 18:45   ` Antoine Tenart [this message]
2016-07-19 19:08     ` Junio C Hamano
2016-07-19 19:33       ` Antoine Tenart
2016-07-19 18:52   ` Eric Sunshine
2016-07-20  6:41     ` Antoine Tenart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160719184510.GA28551@kwain \
    --to=antoine.tenart@ack.tf \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).