We\'re just moving to git at my work. We have a reasonably large project with some fairly large resources under version control (~500MB).
Today we tried to push a br
Another factor can explain the git push poor performance:
"git push" used to check ambiguities between object-names and refnames while processing the list of refs' old and new values, which was unnecessary (as it knew that it is feeding raw object names).
See commit a4544b3 (06 Nov 2018) by Derrick Stolee (derrickstolee).
Helped-by: Jeff King (peff).
(Merged by Junio C Hamano -- gitster -- in commit 1373999, 19 Nov 2018)
pack-objects: ignore ambiguous object warningsA
git pushprocess runs several processes during its run, but one includesgit send-packwhich callsgit pack-objectsand passes the known have/wants into stdin using object ids.However, the default setting for
core.warnAmbiguousRefsrequiresgit pack-objectsto check for ref names matching theref_rev_parse_rulesarray inrefs.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.
This has been fixed with Git 2.20 (Q4 2018).