git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Carlos Martín Nieto" <cmn@elego.de>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] Allow cloning branches selectively
Date: Sun, 25 Dec 2011 08:28:39 -0800 (PST)	[thread overview]
Message-ID: <m3hb0ofwem.fsf@localhost.localdomain> (raw)
In-Reply-To: <1324671199-7074-1-git-send-email-cmn@elego.de>

Carlos Martín Nieto <cmn@elego.de> writes:

> Sometimes it's useful to clone only a subset of branches from a remote
> we're cloning. Teach clone the --fetch option to select which branches
> should get fetched.
> 
> Each --fetch sets up a fetch refspec for that branch. Previously this
> was only possible by initializing a repo and manually setting up the
> config.

I haven't read the code, but I guess it should be possible to share
code with "git remote add", which allows to select which branches to
track, and which branch is to be 'main' on remote.

  git remote add [-t <branch>] [-m <master>] [-f] ...

-- 
Jakub Narebski

  parent reply	other threads:[~2011-12-25 16:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-23 20:13 [RFC PATCH] Allow cloning branches selectively Carlos Martín Nieto
2011-12-23 21:18 ` Junio C Hamano
2011-12-25 20:37   ` Carlos Martín Nieto
2011-12-24  4:31 ` Nguyen Thai Ngoc Duy
2011-12-25 19:00   ` Carlos Martín Nieto
2011-12-25 16:28 ` Jakub Narebski [this message]
2011-12-25 17:43   ` Carlos Martín Nieto

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=m3hb0ofwem.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=cmn@elego.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).