summaryrefslogtreecommitdiff
path: root/tests/clar_libgit2.c
diff options
context:
space:
mode:
authorPierre-Olivier Latour <pol@mac.com>2014-12-02 05:11:12 -0800
committerEdward Thomson <ethomson@microsoft.com>2015-01-14 10:17:56 -0600
commit36fc5497810f60cacdfab249c84583d25032a150 (patch)
tree2bc5b09b87564b4946c5283f9c7d2df29c5e2e0c /tests/clar_libgit2.c
parentd147900ea4756975effa6cb568f932a4e3eb698f (diff)
downloadlibgit2-36fc5497810f60cacdfab249c84583d25032a150.tar.gz
Added GIT_HASHSIG_ALLOW_SMALL_FILES to allow computing signatures for small files
The implementation of the hashsig API disallows computing a signature on small files containing only a few lines. This new flag disables this behavior. git_diff_find_similar() sets this flag by default which means that rename / copy detection of small files will now work. This in turn affects the behavior of the git_status and git_blame APIs which will now detect rename of small files assuming the right options are passed.
Diffstat (limited to 'tests/clar_libgit2.c')
-rw-r--r--tests/clar_libgit2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/clar_libgit2.c b/tests/clar_libgit2.c
index 10f37ad5c..a8a8ba6ab 100644
--- a/tests/clar_libgit2.c
+++ b/tests/clar_libgit2.c
@@ -53,6 +53,11 @@ void cl_git_rewritefile(const char *path, const char *content)
cl_git_write2file(path, content, 0, O_WRONLY | O_CREAT | O_TRUNC, 0644);
}
+void cl_git_rmfile(const char *filename)
+{
+ cl_must_pass(p_unlink(filename));
+}
+
#ifdef GIT_WIN32
#include "win32/utf-conv.h"