diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-12-05 14:02:48 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-11 01:14:18 +0100 |
commit | b016918b2f283513758957b06a14eb2f5c2a9619 (patch) | |
tree | 3f24fe80042ec67470e6b64f4f6db374866395bc /transport.c | |
parent | receive-pack: allow pushes that update .git/shallow (diff) | |
download | git-b016918b2f283513758957b06a14eb2f5c2a9619.tar.xz git-b016918b2f283513758957b06a14eb2f5c2a9619.zip |
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 a09fdb6df2..d596abb9c6 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); |