Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch-pack: specify OBJECT_INFO_QUICK to remove duplicate prepare_pac… #1379

Merged
merged 1 commit into from
Nov 28, 2017

Conversation

atetubou
Copy link

…ked_git call

When I run git fetch, git tries to find object for each local and remote refs.
Without specifying OBJECT_INFO_QUICK, has_object_file list up entries in pack directory for each calls.

This patch makes git fetch fast for the repositories having large number of refs,
especially for windows because it's directory list up api is much slower than linux.

Signed-off-by: Takuto Ikuta tikuta@chromium.org

@atetubou
Copy link
Author

This is for early pickup of this to speedup git fetch on windows.
https://public-inbox.org/git/20171120202920.7ppcwmzkxifywtoj@sigill.intra.peff.net/

When I run git fetch, git tries to find object for each local and remote
refs.  Without specifying OBJECT_INFO_QUICK, has_object_file list up
entries in pack directory for each calls.

This patch makes git fetch fast for the repositories having large number
of refs, especially for windows because it's directory list up api is
much slower than linux.

Note: this patch was developed independently also by Jeff King:
https://public-inbox.org/git/20171120202920.7ppcwmzkxifywtoj@sigill.intra.peff.net/

Signed-off-by: Takuto Ikuta <tikuta@chromium.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho force-pushed the object_info_quick branch from dcd6c3c to ff4a783 Compare November 28, 2017 11:20
@dscho
Copy link
Member

dscho commented Nov 28, 2017

Thank you! I adjusted the formatting according to core Git's standards (they are pretty anal about their coding style, even if there is no fixed set of concrete rules, leaving a lot of room to discussions e.g. where to wrap the lines), and I also mentioned @peff's patch in the commit message.

@dscho dscho merged commit 289598f into git-for-windows:master Nov 28, 2017
dscho pushed a commit to atetubou/git that referenced this pull request Nov 28, 2017
This reverts commit 09ccec4.

Using fscache here is not right way. It is better to specify
OBJECT_INFO_QUICK flag for has_object_file instead, as was done in Pull
Request git-for-windows#1379. This flag prevents directory list up for each refs also.

Signed-off-by: Takuto Ikuta <tikuta@chromium.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho added this to the v2.15.0(2) milestone Nov 29, 2017
dscho added a commit that referenced this pull request Nov 29, 2017
fetch-pack: specify OBJECT_INFO_QUICK to remove duplicate prepare_pac…
git-for-windows-ci pushed a commit that referenced this pull request Dec 6, 2017
fetch-pack: specify OBJECT_INFO_QUICK to remove duplicate prepare_pac…
dscho added a commit that referenced this pull request Jan 2, 2018
fetch-pack: specify OBJECT_INFO_QUICK to remove duplicate prepare_pac…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants