mirror of
https://git.proxmox.com/git/libgit2
synced 2025-11-02 19:15:06 +00:00
diff: ignore nsecs when diffing
Although our index contains the literal time present in the index, we do not read nanoseconds from disk, and thus we should not use them in any comparisons, lest we always think our working directory is dirty. Guard this behind a `GIT_USE_NSECS` for future improvement.
This commit is contained in:
parent
99a09f7f18
commit
7499eae98a
@ -493,8 +493,10 @@ static int diff_list_apply_options(
|
||||
|
||||
/* Don't set GIT_DIFFCAPS_USE_DEV - compile time option in core git */
|
||||
|
||||
/* Set GIT_DIFFCAPS_TRUST_NANOSECS on a platform basis */
|
||||
/* Don't trust nanoseconds; we do not load nanos from disk */
|
||||
#ifdef GIT_USE_NSEC
|
||||
diff->diffcaps = diff->diffcaps | GIT_DIFFCAPS_TRUST_NANOSECS;
|
||||
#endif
|
||||
|
||||
/* If not given explicit `opts`, check `diff.xyz` configs */
|
||||
if (!opts) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user