summaryrefslogtreecommitdiff
path: root/tests-clar/clar_libgit2.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-06-04 16:17:41 -0700
committerRussell Belfer <rb@github.com>2012-06-08 12:09:10 -0700
commit0abd724454078f2089701b54be94df7306dcfb8e (patch)
tree603540e3cabb66601f063d3538fbce7f7d022af0 /tests-clar/clar_libgit2.h
parent80c03754ae57ad387a6c02a5e58a59a327d44638 (diff)
downloadlibgit2-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 'tests-clar/clar_libgit2.h')
-rw-r--r--tests-clar/clar_libgit2.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests-clar/clar_libgit2.h b/tests-clar/clar_libgit2.h
index aa613b2c4..a3b03bbb3 100644
--- a/tests-clar/clar_libgit2.h
+++ b/tests-clar/clar_libgit2.h
@@ -40,6 +40,9 @@ void cl_git_append2file(const char *filename, const char *new_content);
void cl_git_rewritefile(const char *filename, const char *new_content);
void cl_git_write2file(const char *filename, const char *new_content, int mode);
+bool cl_toggle_filemode(const char *filename);
+bool cl_is_chmod_supported(void);
+
/* Environment wrappers */
char *cl_getenv(const char *name);
int cl_setenv(const char *name, const char *value);