diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-12-05 20:02:48 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-10 16:14:18 -0800 |
commit | b016918b2f283513758957b06a14eb2f5c2a9619 (patch) | |
tree | 3f24fe80042ec67470e6b64f4f6db374866395bc /transport.c | |
parent | 0a1bc12b6e401825f009ac8bb14fc438f77e2d9f (diff) | |
download | git-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.c | 5 |
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); |