aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-05 20:02:48 +0700
committerJunio C Hamano <gitster@pobox.com>2013-12-10 16:14:18 -0800
commitb016918b2f283513758957b06a14eb2f5c2a9619 (patch)
tree3f24fe80042ec67470e6b64f4f6db374866395bc /transport.c
parent0a1bc12b6e401825f009ac8bb14fc438f77e2d9f (diff)
downloadgit-b016918b2f283513758957b06a14eb2f5c2a9619.tar.gz
git-b016918b2f283513758957b06a14eb2f5c2a9619.tar.xz
send-pack: support pushing to 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>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/transport.c b/transport.c
index a09fdb6df..d596abb9c 100644
--- a/transport.c
+++ b/transport.c
@@ -819,11 +819,10 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
struct ref *tmp_refs;
connect_setup(transport, 1, 0);
- get_remote_heads(data->fd[0], NULL, 0, &tmp_refs, REF_NORMAL, NULL, NULL);
+ get_remote_heads(data->fd[0], NULL, 0, &tmp_refs, REF_NORMAL,
+ NULL, &data->shallow);
data->got_remote_heads = 1;
}
- if (data->shallow.nr)
- die("pushing to a shallow repository is not supported");
memset(&args, 0, sizeof(args));
args.send_mirror = !!(flags & TRANSPORT_PUSH_MIRROR);