summaryrefslogtreecommitdiff
path: root/builtin/send-pack.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-05 13:02:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-11 00:14:18 (GMT)
commitb016918b2f283513758957b06a14eb2f5c2a9619 (patch)
tree3f24fe80042ec67470e6b64f4f6db374866395bc /builtin/send-pack.c
parent0a1bc12b6e401825f009ac8bb14fc438f77e2d9f (diff)
downloadgit-b016918b2f283513758957b06a14eb2f5c2a9619.zip
git-b016918b2f283513758957b06a14eb2f5c2a9619.tar.gz
git-b016918b2f283513758957b06a14eb2f5c2a9619.tar.bz2
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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index ea2ab28..664dd20 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);