All of lore.kernel.org
 help / color / mirror / Atom feed
From: Norbert Nemec <norbert.nemec@native-instruments.de>
To: git@vger.kernel.org
Subject: shallow&single-branch clone?
Date: Wed, 19 Oct 2011 15:30:48 +0200	[thread overview]
Message-ID: <4E9ED108.5020505@native-instruments.de> (raw)

Hi there,

it seems like there is no way to clone a single branch with truncated 
history.

Truncating history is done by 'git clone --depth 1', there is not way to 
restrict 'clone' to a single branch (the --branch option still downloads 
all branches and only then chooses something other than HEAD as active 
branch).

The manual sequence
	git init
	git remote add -t master -f origin URL
	git checkout
allows a clone of a single branch but offers no means to truncate history.

The least intrusive solution would be an additional option to clone, 
perhaps '--branch-only'.

More user friendly, this options should be on by default when --depth is 
set. After all: who would expect branches to be cloned when the history 
is explicitely truncated?

Ideas?

Greetings,
Norbert Nemec

             reply	other threads:[~2011-10-19 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 13:30 Norbert Nemec [this message]
2011-10-21  1:22 ` shallow&single-branch clone? Jeff King

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=4E9ED108.5020505@native-instruments.de \
    --to=norbert.nemec@native-instruments.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 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.