git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* shallow&single-branch clone?
@ 2011-10-19 13:30 Norbert Nemec
  2011-10-21  1:22 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Norbert Nemec @ 2011-10-19 13:30 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-21  1:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-19 13:30 shallow&single-branch clone? Norbert Nemec
2011-10-21  1:22 ` Jeff King

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).