Conversation

julianmesa-gitkraken

Fix degrade performance using GIT_USE_NSEC on repos cloned with GIT_USE_NSEC disabled.
We just mimic the GIT_USE_NSEC disabled behavior when nanoseconds are 0.
There is a edge case when nanoseconds is 0 in a repo cloned with GIT_USE_NSEC enabled, never found it but anyway that file will be handle fine just the sha1 will be generated to check if has changed.

Enabling GIT_USE_NSEC we will get a boost performance in LFS repos using long running process filter.
Using long running process filter the LFS files and the index will have similar timestamp, the only difference is nanoseconds, if you execute git_status_list_new withouth GIT_USE_NSEC then the clean filter will triggered because the seconds are the same in LFS files and index because of the batch mode ("git lfs checkout")

@ianhattendorfianhattendorf merged commit 013d416 into nodegit:libgit-next May 18, 2022
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.