From: Mark Levedahl <mlevedahl@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>, Git List <git@vger.kernel.org>
Cc: Duy Nguyen <pclouds@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"
Date: Tue, 30 Jun 2015 18:32:54 -0400 [thread overview]
Message-ID: <55931916.9030908@gmail.com> (raw)
In-Reply-To: <CAPig+cT0a201MVTsvvLrndr40GsMkyvtao33Gt=AFhvShtr=Kg@mail.gmail.com>
On 06/30/2015 06:11 PM, Eric Sunshine wrote:
> On Tue, Jun 30, 2015 at 12:56 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> The command "git checkout --to <path>" is something of an anachronism,
>> encompassing functionality somewhere between "checkout" and "clone".
>> The introduction of the git-worktree command, however, provides a proper
>> and intuitive place to house such functionality. Consequently,
>> re-implement "git checkout --to" as "git worktree new".
>> [...]
>> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
>> ---
>> This is primarily a code and documentation relocation patch, with minor
>> new code added to builtin/worktree.c. Specifically:
>>
>> * builtin/worktree.c:new() is new. It recognizes a --force option ("git
>> worktree new --force <path> <branch>") which allows a branch to be
>> checked out in a new worktree even if already checked out in some
>> other worktree (thus, mirroring the functionality of "git checkout
>> --ignore-other-worktrees").
>
> Speaking of "git worktree new --force", should we revisit "git
> checkout --ignore-other-worktrees" before it gets set in stone? In
> particular, I'm wondering if it makes sense to overload git-checkout's
> existing --force option to encompass the functionality of
> --ignore-other-worktrees as well. I don't think there would be any
> semantic conflict by overloading --force, and I do think that --force
> is more discoverable and more intuitive.
>
I agree with -f subsuming --ignore...: -f/--force should really mean
"do this if at all possible", not just "ignore some checks". Similar to
rm -f, etc.
Maintaining --ignore-other-worktrees, and making that a configurable
option (worktree.ignoreothers??) would allow selectively ignoring just
this one issue, perhaps permanently, but not the others -f already
overrides. This would make sense if other options were added to ignore
other subsets of checks that can block a checkout, probably not otherwise.
Mark
next prev parent reply other threads:[~2015-06-30 22:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 4:56 [RFC/PATCH] worktree: replace "checkout --to" with "worktree new" Eric Sunshine
2015-06-30 9:23 ` Duy Nguyen
2015-06-30 16:33 ` Junio C Hamano
2015-07-01 10:46 ` Duy Nguyen
2015-06-30 22:02 ` Eric Sunshine
2015-07-01 6:37 ` Eric Sunshine
2015-06-30 17:13 ` Junio C Hamano
2015-06-30 22:11 ` Eric Sunshine
2015-06-30 22:27 ` Junio C Hamano
2015-07-01 4:48 ` Mikael Magnusson
2015-06-30 22:32 ` Mark Levedahl [this message]
2015-07-01 16:53 ` Junio C Hamano
2015-07-01 17:13 ` Eric Sunshine
2015-07-01 17:16 ` Eric Sunshine
2015-07-01 17:32 ` Junio C Hamano
2015-07-01 18:18 ` Eric Sunshine
2015-07-01 18:52 ` Junio C Hamano
2015-07-02 1:07 ` Duy Nguyen
2015-07-02 2:52 ` Eric Sunshine
2015-07-02 12:41 ` Duy Nguyen
2015-07-02 12:50 ` Duy Nguyen
2015-07-02 17:06 ` Eric Sunshine
2015-07-02 22:41 ` Duy Nguyen
2015-07-02 16:59 ` Eric Sunshine
2015-07-02 18:45 ` Eric Sunshine
2015-07-02 19:00 ` Eric Sunshine
2015-07-02 19:19 ` Eric Sunshine
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=55931916.9030908@gmail.com \
--to=mlevedahl@gmail.com \
--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).