summaryrefslogtreecommitdiff
path: root/builtin/send-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/send-pack.c')
-rw-r--r--builtin/send-pack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index faaa603..961df04 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -208,6 +208,9 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
(send_all && args.send_mirror))
usage(send_pack_usage);
+ if (is_repository_shallow())
+ die("attempt to push from a shallow repository");
+
if (remote_name) {
remote = remote_get(remote_name);
if (!remote_has_url(remote, dest)) {