Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-06-05 03:17:41 +0400
committerRussell Belfer <rb@github.com>2012-06-08 23:09:10 +0400
commit0abd724454078f2089701b54be94df7306dcfb8e (patch)
tree603540e3cabb66601f063d3538fbce7f7d022af0 /src/diff.h
parent80c03754ae57ad387a6c02a5e58a59a327d44638 (diff)
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.h5
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