diff mbox series

[1/1] send-pack: set core.warnAmbiguousRefs=false

Message ID 1ef2c51550c57bddc64426081eac2dde3349fb05.1541531625.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series send-pack: set core.warnAmbiguousRefs=false | expand

Commit Message

Linus Arver via GitGitGadget Nov. 6, 2018, 7:13 p.m. UTC
From: Derrick Stolee <dstolee@microsoft.com>

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 <dstolee@microsoft.com>
---
 send-pack.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

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");