aboutsummaryrefslogtreecommitdiff
path: root/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-21 22:23:58 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-21 22:23:58 -0800
commita0022eebf345a4515c7d148c303911010b1fa834 (patch)
tree6a0924178128df3ac8caace32e404eea04375f22 /receive-pack.c
parentf43117a6c134f3b7873983eae0df1cc14b270ff1 (diff)
downloadgit-a0022eebf345a4515c7d148c303911010b1fa834.tar.gz
git-a0022eebf345a4515c7d148c303911010b1fa834.tar.xz
shallow repository: disable unsupported operations for now.
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>
Diffstat (limited to 'receive-pack.c')
-rw-r--r--receive-pack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/receive-pack.c b/receive-pack.c
index c176d8fd0..6333f00c6 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -421,6 +421,9 @@ int main(int argc, char **argv)
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();