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:
authorVicent Martí <vicent@github.com>2012-10-30 22:51:58 +0400
committerVicent Martí <vicent@github.com>2012-10-30 22:51:58 +0400
commit6c21358a89efe5d4b8c5ab26dd707500653ba911 (patch)
tree1ab30e4eafa3cff21fb8d6564bcb788b3b03aab6 /tests-clar/stash
parent6cfbbf7e3205e902bd94bf16743127c705e3e588 (diff)
parentf45ec1a076e2347ba5d63eeb2d158f87b612e5cb (diff)
Merge pull request #1029 from ethomson/index_refactor
Index changes
Diffstat (limited to 'tests-clar/stash')
-rw-r--r--tests-clar/stash/drop.c2
-rw-r--r--tests-clar/stash/save.c4
-rw-r--r--tests-clar/stash/stash_helpers.c12
3 files changed, 9 insertions, 9 deletions
diff --git a/tests-clar/stash/drop.c b/tests-clar/stash/drop.c
index 136a94242..5bbc7452a 100644
--- a/tests-clar/stash/drop.c
+++ b/tests-clar/stash/drop.c
@@ -30,7 +30,7 @@ static void push_three_states(void)
cl_git_mkfile("stash/zero.txt", "content\n");
cl_git_pass(git_repository_index(&index, repo));
- cl_git_pass(git_index_add(index, "zero.txt", 0));
+ cl_git_pass(git_index_add_from_workdir(index, "zero.txt"));
commit_staged_files(&oid, index, signature);
cl_git_mkfile("stash/one.txt", "content\n");
diff --git a/tests-clar/stash/save.c b/tests-clar/stash/save.c
index 71b0b6486..01acf672c 100644
--- a/tests-clar/stash/save.c
+++ b/tests-clar/stash/save.c
@@ -246,8 +246,8 @@ void test_stash_save__cannot_stash_when_there_are_no_local_change(void)
* 'what' and 'who' are being committed.
* 'when' remain untracked.
*/
- git_index_add(index, "what", 0);
- git_index_add(index, "who", 0);
+ git_index_add_from_workdir(index, "what");
+ git_index_add_from_workdir(index, "who");
cl_git_pass(git_index_write(index));
commit_staged_files(&commit_oid, index, signature);
git_index_free(index);
diff --git a/tests-clar/stash/stash_helpers.c b/tests-clar/stash/stash_helpers.c
index 35017cec6..0e93ecff0 100644
--- a/tests-clar/stash/stash_helpers.c
+++ b/tests-clar/stash/stash_helpers.c
@@ -45,10 +45,10 @@ void setup_stash(git_repository *repo, git_signature *signature)
cl_git_mkfile("stash/.gitignore", "*.ignore\n");
- cl_git_pass(git_index_add(index, "what", 0));
- cl_git_pass(git_index_add(index, "how", 0));
- cl_git_pass(git_index_add(index, "who", 0));
- cl_git_pass(git_index_add(index, ".gitignore", 0));
+ cl_git_pass(git_index_add_from_workdir(index, "what"));
+ cl_git_pass(git_index_add_from_workdir(index, "how"));
+ cl_git_pass(git_index_add_from_workdir(index, "who"));
+ cl_git_pass(git_index_add_from_workdir(index, ".gitignore"));
cl_git_pass(git_index_write(index));
commit_staged_files(&commit_oid, index, signature);
@@ -57,8 +57,8 @@ void setup_stash(git_repository *repo, git_signature *signature)
cl_git_rewritefile("stash/how", "not so small and\n"); /* e6d64adb2c7f3eb8feb493b556cc8070dca379a3 */
cl_git_rewritefile("stash/who", "funky world\n"); /* a0400d4954659306a976567af43125a0b1aa8595 */
- cl_git_pass(git_index_add(index, "what", 0));
- cl_git_pass(git_index_add(index, "how", 0));
+ cl_git_pass(git_index_add_from_workdir(index, "what"));
+ cl_git_pass(git_index_add_from_workdir(index, "how"));
cl_git_pass(git_index_write(index));
cl_git_rewritefile("stash/what", "see you later\n"); /* bc99dc98b3eba0e9157e94769cd4d49cb49de449 */