summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-10-22 18:35:43 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-10-22 18:35:43 +0200
commitdc2cf3eb1a71700a064720618ed5df267cffcbac (patch)
treec9651ed9547a2dd1beaa676e3c4b06cec9f0ac84 /src/diff.c
parent44b1e3e390c85199186d6178bd942bf9e7c4bef1 (diff)
parent7499eae98aaf15805882c3db16b661d76260af79 (diff)
downloadlibgit2-dc2cf3eb1a71700a064720618ed5df267cffcbac.tar.gz
Merge pull request #3480 from ethomson/nsecs
Nanoseconds in the index: ignore for diffing
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c
index d97dcd9d2..d98a28966 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -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) {