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 /builtin/send-pack.c | |
parent | 0a1bc12b6e401825f009ac8bb14fc438f77e2d9f (diff) | |
download | git-b016918b2f283513758957b06a14eb2f5c2a9619.tar.gz |
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 'builtin/send-pack.c')
-rw-r--r-- | builtin/send-pack.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c index ea2ab2815e..664dd20f40 100644 --- a/builtin/send-pack.c +++ b/builtin/send-pack.c @@ -101,6 +101,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) int fd[2]; struct child_process *conn; struct sha1_array extra_have = SHA1_ARRAY_INIT; + struct sha1_array shallow = SHA1_ARRAY_INIT; struct ref *remote_refs, *local_refs; int ret; int helper_status = 0; @@ -232,7 +233,8 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) args.verbose ? CONNECT_VERBOSE : 0); } - get_remote_heads(fd[0], NULL, 0, &remote_refs, REF_NORMAL, &extra_have, NULL); + get_remote_heads(fd[0], NULL, 0, &remote_refs, REF_NORMAL, + &extra_have, &shallow); transport_verify_remote_names(nr_refspecs, refspecs); |