git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Jeff King <peff@peff.net>
Cc: Nanako Shiraishi <nanako3@lavabit.com>,
	David Soria Parra <sn_@gmx.net>,
	git@vger.kernel.org
Subject: Re: [PATCH v2] Add --track option to git clone
Date: Thu, 3 Dec 2009 06:31:46 +0100	[thread overview]
Message-ID: <20091203053146.GA23215@atjola.homenet> (raw)
In-Reply-To: <20091202190807.GB30778@coredump.intra.peff.net>

On 2009.12.02 14:08:07 -0500, Jeff King wrote:
> And for convenience of the user, you would want a way to avoid repeating
> the name of the "I want to check this out" branch. So either:
> 
>   1. Add "--track foo" as a convenience wrapper for "-f foo -b foo".

Hm, we already have --track for "remote add", and that supports being
supplied multiple times, so I guess for clone, that should work too. But
if track implies -b, having multiple --track seems rather weird. Which
branch head would be created? One for the first --track? Or the last
one? Or one for each? So I'd rather not make --track imply -b.

>   2. If no "-b" is given, the first "-f" is assumed as "-b". So "git
>      clone -f foo" becomes equivalent to David's --track.

Won't work if the first one is -f refs/heads/subst/*:refs/remotes/origin/*

> And of course the name "-f" (for --fetch, if you were wondering) is open
> to suggestion.
> 
> What do you think?

I'd prefer to see just --track for consistency with "remote add". That
could even learn to use globs, but allowing to specify the right side of
the refspec seems wrong given the option name, so it would be more
limited than your -f option.

Björn

      parent reply	other threads:[~2009-12-03  5:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01 22:51 [PATCH v2] Add --track option to git clone David Soria Parra
2009-12-01 22:51 ` [PATCH v2 1/2] Teach clone to clone just one remote branch using --track David Soria Parra
2009-12-01 22:51 ` [PATCH v2 2/2] Documentation: Add --track option to the git clone manpage David Soria Parra
2009-12-02  2:08 ` [PATCH v2] Add --track option to git clone Sean Estabrooks
2009-12-02  7:20   ` David Soria Parra
2009-12-02 10:20 ` Nanako Shiraishi
2009-12-02 10:33   ` David Soria Parra
2009-12-02 19:08   ` Jeff King
2009-12-02 19:27     ` David Soria Parra
2009-12-02 21:07     ` Nanako Shiraishi
2009-12-02 22:37       ` Jeff King
2009-12-02 23:02         ` Junio C Hamano
2009-12-03  5:31     ` Björn Steinbrink [this message]

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=20091203053146.GA23215@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=nanako3@lavabit.com \
    --cc=peff@peff.net \
    --cc=sn_@gmx.net \
    /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).