receive/send-pack: support pushing from a shallow clone

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2013-12-05 20:02:44 +07:00
committed by Junio C Hamano
parent 31c42bff35
commit 5dbd767601
5 changed files with 146 additions and 11 deletions

View File

@ -208,7 +208,7 @@ 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())
if (is_repository_shallow() && args.stateless_rpc)
die("attempt to push from a shallow repository");
if (remote_name) {