* [PATCH] Documentation on depth option in git clone.
@ 2013-01-07 18:10 Stefan Beller
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Beller @ 2013-01-07 18:10 UTC (permalink / raw)
To: gitster, schlotter, Ralf.Wildenhues, git; +Cc: Stefan Beller
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
Documentation/git-clone.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 7fefdb0..e76aa50 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -186,7 +186,8 @@ objects from the source repository into a pack in the cloned repository.
it, nor push from nor into it), but is adequate if you
are only interested in the recent history of a large project
with a long history, and would want to send in fixes
- as patches.
+ as patches. The depth should be at least 1. If it is 0 or
+ below, the cloned repository will not be shallow.
--single-branch::
Clone only the history leading to the tip of a single branch,
--
1.8.1.80.g3e293fb.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] git clone depth of 0 not possible.
@ 2013-01-07 18:06 Stefan Beller
2013-01-07 18:06 ` [PATCH] Documentation on depth option in git clone Stefan Beller
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Beller @ 2013-01-07 18:06 UTC (permalink / raw)
To: schlotter, gitster, Ralf.Wildenhues, git; +Cc: Stefan Beller
Currently it is not possible to have a shallow depth of
just 0, i.e. only one commit in that repository after cloning.
The minimum number of commits is 2, caused by depth=1.
I had no good idea how to add this behavior to git clone as
the depth variable in git_transport_options struct (file transport.h)
uses value 0 for another meaning, so it would have need changes at
all places, where the transport options depth is being used
(e.g. fetch)
So I documented the current behavior, see attached patch.
Stefan Beller (1):
Documentation on depth option in git clone.
Documentation/git-clone.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
1.8.1.80.g3e293fb.dirty
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Documentation on depth option in git clone.
2013-01-07 18:06 [PATCH] git clone depth of 0 not possible Stefan Beller
@ 2013-01-07 18:06 ` Stefan Beller
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Beller @ 2013-01-07 18:06 UTC (permalink / raw)
To: schlotter, gitster, Ralf.Wildenhues, git; +Cc: Stefan Beller
---
Documentation/git-clone.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 7fefdb0..e76aa50 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -186,7 +186,8 @@ objects from the source repository into a pack in the cloned repository.
it, nor push from nor into it), but is adequate if you
are only interested in the recent history of a large project
with a long history, and would want to send in fixes
- as patches.
+ as patches. The depth should be at least 1. If it is 0 or
+ below, the cloned repository will not be shallow.
--single-branch::
Clone only the history leading to the tip of a single branch,
--
1.8.1.80.g3e293fb.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-07 18:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 18:10 [PATCH] Documentation on depth option in git clone Stefan Beller
-- strict thread matches above, loose matches on Subject: below --
2013-01-07 18:06 [PATCH] git clone depth of 0 not possible Stefan Beller
2013-01-07 18:06 ` [PATCH] Documentation on depth option in git clone Stefan Beller
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).