summaryrefslogtreecommitdiff
path: root/receive-pack.c
diff options
context:
space:
mode:
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 c176d8f..6333f00 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();