summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-11-06 20:34:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-07 01:49:58 (GMT)
commita4544b311eab7c3ffd2aa96deb9be0b92df05ae2 (patch)
treefa9270e690467af942673231dcb007078caa99b4 /builtin/log.c
parentcae598d9980661a978e2df4fb338518f7bf09572 (diff)
downloadgit-a4544b311eab7c3ffd2aa96deb9be0b92df05ae2.zip
git-a4544b311eab7c3ffd2aa96deb9be0b92df05ae2.tar.gz
git-a4544b311eab7c3ffd2aa96deb9be0b92df05ae2.tar.bz2
pack-objects: ignore ambiguous object warnings
A git push process runs several processes during its run, but one includes git send-pack which calls git pack-objects and passes the known have/wants into stdin using object ids. However, the default setting for core.warnAmbiguousRefs requires git pack-objects to check for ref names matching the ref_rev_parse_rules array in refs.c. This means that every object is triggering at least six "file exists?" queries. When there are a lot of refs, this can add up significantly! I observed a simple push spending three seconds checking these paths. The fix here is similar to 4c30d50 "rev-list: disable object/refname ambiguity check with --stdin". While the get_object_list() method reads the objects from stdin, turn warn_on_object_refname_ambiguity flag (which is usually true) to false. Just for code hygiene, save away the original at the beginning and restore it once we are done. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
0 files changed, 0 insertions, 0 deletions