From: Thomas Gummerer <t.gummerer@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Git List" <git@vger.kernel.org>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH v1 2/2] worktree: make add dwim
Date: Sat, 18 Nov 2017 18:13:45 +0000 [thread overview]
Message-ID: <20171118181345.GC32324@hank> (raw)
In-Reply-To: <20171115085229.GB32324@hank>
On 11/15, Thomas Gummerer wrote:
> On 11/14, Eric Sunshine wrote:
> > On Tue, Nov 14, 2017 at 3:14 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> > > For my own edification...
> > > [...]
> > > git worktree add ../topic
> > >
> > > * Correctly errors out, refusing to create a new branch named "topic",
> > > if "topic" is already a branch.
> >
> > By the way, there's an additional DWIM that could be done here instead
> > of erroring out. Specifically, for "git worktree add ../topic":
> >
> > * If branch "topic" exists, check it out (rather than refusing to
> > create a new branch named "topic").
>
> I think this would be a good improvement either way as I suspect this
> is what users would hope for, and as it currently just dies there are
> less backwards compatibility worries.
While I still think this would be an improvement, after thinking about
it a bit more I think this is somewhat orthogonal to what I'm trying
to achieve with this patch series. Therefore I didn't implement this
yet, but I'm still thinking of implementing this in a separate topic.
> > * If origin/topic exists, DWIM local "topic" branch into existence.
> >
> > * Otherwise, create new local branch "topic".
> >
> > > * Creates a new branch named "topic" if no such local branch exists.
> > >
> > > The desired new DWIMing would change the second bullet point to:
> > >
> > > * If no local branch named "topic" exists, DWIM it from "origin/topic"
> > > if possible, else create a new local branch named "topic".
next prev parent reply other threads:[~2017-11-18 18:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-12 13:43 [PATCH v1 1/2] checkout: factor out functions to new lib file Thomas Gummerer
2017-11-12 13:43 ` [PATCH v1 2/2] worktree: make add dwim Thomas Gummerer
2017-11-13 3:04 ` Junio C Hamano
2017-11-14 8:45 ` Thomas Gummerer
2017-11-14 20:14 ` Eric Sunshine
2017-11-14 20:29 ` Eric Sunshine
2017-11-15 8:52 ` Thomas Gummerer
2017-11-18 18:13 ` Thomas Gummerer [this message]
2017-11-15 8:50 ` Thomas Gummerer
2017-11-15 9:12 ` Eric Sunshine
2017-11-13 2:41 ` [PATCH v1 1/2] checkout: factor out functions to new lib file Junio C Hamano
2017-11-14 8:46 ` Thomas Gummerer
2017-11-18 18:11 ` [PATCH v2 1/3] " Thomas Gummerer
2017-11-18 18:11 ` [PATCH v2 2/3] worktree: make add <path> <branch> dwim Thomas Gummerer
2017-11-18 22:18 ` Thomas Gummerer
2017-11-18 18:11 ` [PATCH v2 3/3] worktree: make add <path> dwim Thomas Gummerer
2017-11-18 22:47 ` [PATCH v3 0/3] make git worktree add dwim more Thomas Gummerer
2017-11-18 22:47 ` [PATCH v3 1/3] checkout: factor out functions to new lib file Thomas Gummerer
2017-11-18 22:47 ` [PATCH v3 2/3] worktree: make add <path> <branch> dwim Thomas Gummerer
2017-11-19 8:31 ` Eric Sunshine
2017-11-19 17:43 ` Thomas Gummerer
2017-11-18 22:47 ` [PATCH v3 3/3] worktree: make add <path> dwim Thomas Gummerer
2017-11-19 19:04 ` Eric Sunshine
2017-11-19 20:20 ` Eric Sunshine
2017-11-20 0:39 ` Junio C Hamano
2017-11-21 22:13 ` Thomas Gummerer
2017-11-22 1:20 ` Junio C Hamano
2017-11-22 19:49 ` Thomas Gummerer
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=20171118181345.GC32324@hank \
--to=t.gummerer@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).