[PATCH] git-clone.txt: document that pushing from a shallow clone may work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The documentation used to say that pushing from a shallow clone is not
supported; this is true, though it may work in some simple cases. If a
user notices this fact, such a mismatch between documentation and reality
may leave them assuming the documentation is wrong and that pushing from
a shallow clone is supported.

This commit updates the documentation to say that pushing from a shallow
clone may work in some cases, but that it's not guaranteed to always do.

Signed-off-by: Adeodato Simó <dato@xxxxxxxxxxxxxx>
---
Hello,

this is about http://thread.gmane.org/gmane.comp.version-control.git/110100,
which got a single reply from Mikael Magnusson stating:

> AFAIK, it will work in simple cases, but isn't guaranteed to work.

If that's the case, I think it should be documented, for the reasons
explained in the commit message.

Thanks!

 Documentation/git-clone.txt |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 95f08b9..1b4f864 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -133,8 +133,10 @@ then the cloned repository will become corrupt.
 --depth <depth>::
 	Create a 'shallow' clone with a history truncated to the
 	specified number of revisions.  A shallow repository has a
-	number of limitations (you cannot clone or fetch from
-	it, nor push from nor into it), but is adequate if you
+	number of limitations: you cannot clone or fetch from it,
+	nor push into it; pushing from it into a regular repository
+	may work correctly in some cases, but it is not guaranteed to
+	always work.  However, a shallow repository 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.
-- 
1.6.2.rc2.271.ge939

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux