summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-01-12 11:38:56 -0800
committerJunio C Hamano <gitster@pobox.com>2015-01-12 11:38:57 -0800
commit832258da969fbedbbd1d474900dbdbdf23d4bca1 (patch)
tree5a4e2d2b8d0f3be973f4871bdb85389db2063c74 /send-pack.c
parente20d5a2c4433daf09797d9e4e9f6c4eaedec86dd (diff)
parent2dacf26d0985521c0f30e535963a45257b63ea21 (diff)
downloadgit-832258da969fbedbbd1d474900dbdbdf23d4bca1.tar.gz
Merge branch 'bc/fetch-thin-less-aggressive-in-normal-repository'
Earlier we made "rev-list --object-edge" more aggressively list the objects at the edge commits, in order to reduce number of objects fetched into a shallow repository, but the change affected cases other than "fetching into a shallow repository" and made it unusably slow (e.g. fetching into a normal repository should not have to suffer the overhead from extra processing). Limit it to a more specific case by introducing --objects-edge-aggressive, a new option to rev-list. * bc/fetch-thin-less-aggressive-in-normal-repository: pack-objects: use --objects-edge-aggressive for shallow repos rev-list: add an option to mark fewer edges as uninteresting Documentation: add missing article in rev-list-options.txt
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/send-pack.c b/send-pack.c
index 949cb61aa0..25947d7df9 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -47,6 +47,7 @@ static int pack_objects(int fd, struct ref *refs, struct sha1_array *extra, stru
NULL,
NULL,
NULL,
+ NULL,
};
struct child_process po = CHILD_PROCESS_INIT;
int i;
@@ -60,6 +61,8 @@ static int pack_objects(int fd, struct ref *refs, struct sha1_array *extra, stru
argv[i++] = "-q";
if (args->progress)
argv[i++] = "--progress";
+ if (is_repository_shallow())
+ argv[i++] = "--shallow";
po.argv = argv;
po.in = -1;
po.out = args->stateless_rpc ? -1 : fd;