All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tor Arne Vestbø" <torarnv@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] git-clone: Add option --branch to override initial branch
Date: Tue, 03 Mar 2009 01:11:27 +0100	[thread overview]
Message-ID: <49AC75AF.4080003@gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0903030047130.10279@pacific.mpi-cbg.de>

Johannes Schindelin wrote:
> On Mon, 2 Mar 2009, Tor Arne Vestbø wrote:
>> The options --branch and -b allow the user to override the initial 
>> branch created and checked out by git-clone. Normally this is the active 
>> branch of the remote repository, which is also the fallback if the 
>> selected branch is not found.
> 
> I do not think that falling back if the selected branch is not found is a 
> wise choice.

Ah, was not sure what the proper response would be. I'll resubmit with a
die() instead.

> Besides, the common way to check out something different than the remote's 
> HEAD is like this:
> 
> 	$ git clone -n $URL
> 	$ cd $DIR
> 	$ git checkout -t origin/$BRANCH

Yepp, plus removing the original branch:

 $ git branch -D $ORIGINAL_ACTIVE_BRANCH # typically master

> I am undecided if that is good enough, or your patch is needed.

The idea was to be able to tell someone "hey, if you want to hack on
some feature for next, do the following:"

 $ git clone git://git.kernel.org/pub/scm/git/git.git -b next

Maybe next is not such a good example, since it does not diverge that
much from master and pu, but imagine a repository with a master, plus
other branches that over time diverge from master (where you would
typically use git-new-workdir to have them in a separate working tree).

In that situation it would be nice to be able to tell someone, hey, if
you want to work on this odd branch which is not master, just do -b.

Tor Arne

  parent reply	other threads:[~2009-03-03  0:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 22:11 [PATCH] git-clone: Add option --branch to override initial branch Tor Arne Vestbø
2009-03-02 23:48 ` Johannes Schindelin
2009-03-03  0:09   ` Junio C Hamano
2009-03-03  0:11   ` Tor Arne Vestbø [this message]
2009-03-03  0:33   ` [PATCH v2] " Tor Arne Vestbø
2009-03-03  9:07     ` Johannes Schindelin
2009-03-03 16:47       ` Tor Arne Vestbø
2009-03-03 16:51         ` Junio C Hamano
2009-03-03 17:04           ` Tor Arne Vestbø
2009-03-03 17:07             ` Junio C Hamano
2009-03-04  6:55     ` Junio C Hamano
2009-03-04  8:56       ` Johannes Schindelin
2009-03-04 10:23       ` Tor Arne Vestbø
2009-03-09 14:39       ` Paolo Ciarrocchi
2009-03-09 16:01         ` Felipe Contreras
2009-03-11  8:52           ` Paolo Ciarrocchi
2009-03-12  4:18             ` Miles Bader
2009-03-12  8:48               ` Paolo Ciarrocchi
2009-03-12  9:12                 ` Felipe Contreras

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=49AC75AF.4080003@gmail.com \
    --to=torarnv@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.