From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] checkout --track: make up a sensible branch name if '-b' was omitted
Date: Sat, 09 Aug 2008 14:11:59 -0700 [thread overview]
Message-ID: <7vsktd51wg.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0808092302520.24820@pacific.mpi-cbg.de.mpi-cbg.de> (Johannes Schindelin's message of "Sat, 9 Aug 2008 23:08:04 +0200 (CEST)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Sat, 9 Aug 2008, Junio C Hamano wrote:
> ...
> At first, I liked the thoughts, but...
>
>> (1) You may not necessarily are used to --track, but may still want this
>> done. It might not be a bad idea to associate this "local dwimming"
>> to creation of a new branch. In other words, all of these:
>>
>> $ git checkout -b origin/next
>
> This cannot be dwimmed, as it literally means "start a new branch called
> 'origin/next' from HEAD".
Right. Forget this part.
>> (2) If you work with somebody else, you might not want to have the name
>> mapping to be "s|^[^/]*/||" (i.e. drop "origin/"):
>>
>> $ git remote add -f jeff $url_to_his_repository
>> $ git checkout -b [--track] jeff-next jeff/next
>> $ git checkout -b [--track] origin-next origin/next
>
> As I said, I think you must not allow switching around the options -b and
> --track.
Oh, that was a typo. "git checkout [--track] -b" was what I meant, but
the point was that with your patch "git checkout --track jeff/next" and
"git checkout --track origin/next" would create 'next' branch which will
not be useful for people who work with more than one repository.
Yes, you can of course explicitly name what you want to create with -b,
but that argument goes directly against the "usability enhancement" theme
of your patch.
Don't mistake this comment as "I oppose to the patch". I was hoping
people who care, not necessarily you, might come up with a clean UI and
mechanism to let users affect how this dwimmery would work depending on
how the users want to work, by raising this point as something to ponder
on.
next prev parent reply other threads:[~2008-08-09 21:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-09 14:00 [PATCH] checkout --track: make up a sensible branch name if '-b' was omitted Johannes Schindelin
2008-08-09 18:44 ` Junio C Hamano
2008-08-09 19:46 ` Junio C Hamano
2008-08-09 21:08 ` Johannes Schindelin
2008-08-09 21:11 ` Junio C Hamano [this message]
2008-08-09 21:44 ` Pieter de Bie
2008-08-10 23:02 ` Johannes Schindelin
2008-08-11 11:01 ` Johannes Schindelin
2008-08-11 18:54 ` Junio C Hamano
2008-08-09 21:56 ` Tarmigan
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vsktd51wg.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).