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:
authorEdward Thomson <ethomson@edwardthomson.com>2012-10-30 05:04:21 +0400
committerEdward Thomson <ethomson@edwardthomson.com>2012-10-30 05:04:21 +0400
commitf45ec1a076e2347ba5d63eeb2d158f87b612e5cb (patch)
tree2e2bebc12e64e6f48eabde6010bf775b3fc6cd6e /tests-clar/stash
parent81eecc342b3580e9b05e501c8ee75c7e2e0dca1a (diff)
index refactoring
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 f646ef28b..925d0372b 100644
--- a/tests-clar/stash/stash_helpers.c
+++ b/tests-clar/stash/stash_helpers.c
@@ -44,10 +44,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);
@@ -56,8 +56,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 */