diff --git a/builtin/send-pack.c b/builtin/send-pack.c index faaa603843..961df04dea 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)) {