diff options
author | Russell Belfer <rb@github.com> | 2012-06-04 16:17:41 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-06-08 12:09:10 -0700 |
commit | 0abd724454078f2089701b54be94df7306dcfb8e (patch) | |
tree | 603540e3cabb66601f063d3538fbce7f7d022af0 /src/diff.h | |
parent | 80c03754ae57ad387a6c02a5e58a59a327d44638 (diff) | |
download | libgit2-0abd724454078f2089701b54be94df7306dcfb8e.tar.gz |
Fix filemode comparison in diffs
File modes were both not being ignored properly on platforms
where they should be ignored, nor be diffed consistently on
platforms where they are supported.
This change adds a number of diff and status filemode change
tests. This also makes sure that filemode-only changes are
included in the diff output when they occur and that filemode
changes are ignored successfully when core.filemode is false.
There is no code that automatically toggles core.filemode
based on the capabilities of the current platform, so the user
still needs to be careful in their .git/config file.
Diffstat (limited to 'src/diff.h')
-rw-r--r-- | src/diff.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/diff.h b/src/diff.h index ac2457956..6cc854fbd 100644 --- a/src/diff.h +++ b/src/diff.h @@ -20,7 +20,7 @@ enum { GIT_DIFFCAPS_HAS_SYMLINKS = (1 << 0), /* symlinks on platform? */ GIT_DIFFCAPS_ASSUME_UNCHANGED = (1 << 1), /* use stat? */ - GIT_DIFFCAPS_TRUST_EXEC_BIT = (1 << 2), /* use st_mode exec bit? */ + GIT_DIFFCAPS_TRUST_MODE_BITS = (1 << 2), /* use st_mode? */ GIT_DIFFCAPS_TRUST_CTIME = (1 << 3), /* use st_ctime? */ GIT_DIFFCAPS_USE_DEV = (1 << 4), /* use st_dev? */ }; @@ -36,5 +36,8 @@ struct git_diff_list { uint32_t diffcaps; }; +extern void git_diff__cleanup_modes( + uint32_t diffcaps, uint32_t *omode, uint32_t *nmode); + #endif |