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
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-05-19 21:12:40 +0300
committerEdward Thomson <ethomson@edwardthomson.com>2015-05-19 21:12:40 +0300
commitacc573cba3212c637d02520fb520326b36dcdd39 (patch)
treeb968e6f67e75faa3d2201267317e45497f91bab8 /tests
parent0aa603363e39e51e8313a2952710f565141080cb (diff)
parent874cc35a8d130735d3d8160191e697021e1ab8fb (diff)
Merge pull request #3109 from libgit2/cmn/index-use-diff
Use a diff for iteration in index_update_all and index_add_all
Diffstat (limited to 'tests')
-rw-r--r--tests/index/addall.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/index/addall.c b/tests/index/addall.c
index a7e2583b2..f13b768ce 100644
--- a/tests/index/addall.c
+++ b/tests/index/addall.c
@@ -193,6 +193,19 @@ void test_index_addall__repo_lifecycle(void)
cl_repo_commit_from_index(NULL, g_repo, NULL, 0, "first commit");
check_status(g_repo, 0, 0, 0, 3, 0, 0, 1);
+ if (cl_repo_get_bool(g_repo, "core.filemode")) {
+ cl_git_pass(git_index_update_all(index, NULL, NULL, NULL));
+ cl_must_pass(p_chmod(TEST_DIR "/file.zzz", 0777));
+ cl_git_pass(git_index_update_all(index, NULL, NULL, NULL));
+ check_status(g_repo, 0, 0, 1, 3, 0, 0, 1);
+
+ /* go back to what we had before */
+ cl_must_pass(p_chmod(TEST_DIR "/file.zzz", 0666));
+ cl_git_pass(git_index_update_all(index, NULL, NULL, NULL));
+ check_status(g_repo, 0, 0, 0, 3, 0, 0, 1);
+ }
+
+
/* attempt to add an ignored file - does nothing */
strs[0] = "file.foo";
cl_git_pass(git_index_add_all(index, &paths, 0, NULL, NULL));