From: Derrick Stolee via GitGitGadget Date: Tue, 06 Nov 2018 19:13:48 GMT Subject: [PATCH 1/1] send-pack: set core.warnAmbiguousRefs=false Message-ID: <1ef2c51550c57bddc64426081eac2dde3349fb05.1541531625.git.gitgitgadget@gmail.com> In-Reply-To: From: Derrick Stolee During a 'git push' command, we run 'git send-pack' inside of our transport helper. This creates a 'git pack-objects' process and passes a list of object ids. If this list is large, then the pack-objects process can spend a lot of time checking the possible refs these strings could represent. Remove this extra check by setting core.warnAmbiguousRefs to false as we call 'git pack-objects'. Signed-off-by: Derrick Stolee --- send-pack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/send-pack.c b/send-pack.c index e920ca57df..5055150fe1 100644 --- a/send-pack.c +++ b/send-pack.c @@ -64,6 +64,8 @@ static int pack_objects(int fd, struct ref *refs, struct oid_array *extra, struc int i; int rc; + argv_array_push(&po.args, "-c"); + argv_array_push(&po.args, "core.warnAmbiguousRefs=false"); argv_array_push(&po.args, "pack-objects"); argv_array_push(&po.args, "--all-progress-implied"); argv_array_push(&po.args, "--revs"); -- gitgitgadget