summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f43117a)
raw | patch | inline | side by side (parent: f43117a)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 22 Jan 2007 06:23:58 +0000 (22:23 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 22 Jan 2007 06:23:58 +0000 (22:23 -0800) |
We currently do not support fetching/cloning from a shallow repository
nor pushing into one. Make sure these are not attempted so that we
do not have to worry about corrupting repositories needlessly.
Signed-off-by: Junio C Hamano <junkio@cox.net>
nor pushing into one. Make sure these are not attempted so that we
do not have to worry about corrupting repositories needlessly.
Signed-off-by: Junio C Hamano <junkio@cox.net>
receive-pack.c | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/receive-pack.c b/receive-pack.c
index c176d8fd008ad858a1e60e19e7bf3ea14d735eb5..6333f00c6eed5038d8da52dcedc48b80a1c73d46 100644 (file)
--- a/receive-pack.c
+++ b/receive-pack.c
if (!enter_repo(dir, 0))
die("'%s': unable to chdir or not a git archive", dir);
+ if (is_repository_shallow())
+ die("attempt to push into a shallow repository");
+
setup_ident();
/* don't die if gecos is empty */
ignore_missing_committer_name();
diff --git a/upload-pack.c b/upload-pack.c
index 3a466c6a3e66fdde2bb20b580db841c0600190bb..3648aae1a777aec4bba77b40b9cf6da484190441 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
if (!enter_repo(dir, strict))
die("'%s': unable to chdir or not a git archive", dir);
-
+ if (is_repository_shallow())
+ die("attempt to fetch/clone from a shallow repository");
upload_pack();
return 0;
}