diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-12 12:07:33 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-14 15:23:12 +0200 |
| commit | 2b2dfe80f065f284aa53351d7203e31cf001cf8a (patch) | |
| tree | b893926ac9dd724269ad7095f72335809e947a98 /tests | |
| parent | 0a78a52ed9c6945151536d0f19aa39b081a4a8ac (diff) | |
| download | libgit2-2b2dfe80f065f284aa53351d7203e31cf001cf8a.tar.gz | |
index: include TYPECHANGE in the diff
Without this option, we would not be able to catch exec bit changes.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/index/addall.c | 13 |
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)); |
