Merge branch 'ti/fetch-everything-local-optim'
commit5d806b74d5223d0c19afd023fea3b321cc5bc717
authorJunio C Hamano <gitster@pobox.com>
Mon, 9 Apr 2018 23:25:43 +0000 (10 08:25 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Apr 2018 23:25:43 +0000 (10 08:25 +0900)
tree6976e1d8d39c17aa9102600e72e3ea40e07e1803
parente4bb62fa1eeee689744b413e29a50b4d1dae6886
parent024aa4696c788eb1b07be53331f770605696ffba
Merge branch 'ti/fetch-everything-local-optim'

A "git fetch" from a repository with insane number of refs into a
repository that is already up-to-date still wasted too many cycles
making many lstat(2) calls to see if these objects at the tips
exist as loose objects locally.  These lstat(2) calls are optimized
away by enumerating all loose objects beforehand.

It is unknown if the new strategy negatively affects existing use
cases, fetching into a repository with many loose objects from a
repository with small number of refs.

* ti/fetch-everything-local-optim:
  fetch-pack.c: use oidset to check existence of loose object
cache.h
fetch-pack.c
sha1_file.c