diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-01-12 11:38:56 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-01-12 11:38:57 -0800 |
commit | 832258da969fbedbbd1d474900dbdbdf23d4bca1 (patch) | |
tree | 5a4e2d2b8d0f3be973f4871bdb85389db2063c74 /upload-pack.c | |
parent | e20d5a2c4433daf09797d9e4e9f6c4eaedec86dd (diff) | |
parent | 2dacf26d0985521c0f30e535963a45257b63ea21 (diff) | |
download | git-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 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c index ac9ac1592d..b531a325d2 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -86,7 +86,7 @@ static void create_pack_file(void) "corruption on the remote side."; int buffered = -1; ssize_t sz; - const char *argv[12]; + const char *argv[13]; int i, arg = 0; FILE *pipe_fd; @@ -100,6 +100,8 @@ static void create_pack_file(void) argv[arg++] = "--thin"; argv[arg++] = "--stdout"; + if (shallow_nr) + argv[arg++] = "--shallow"; if (!no_progress) argv[arg++] = "--progress"; if (use_ofs_delta) |