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>2013-01-12 23:47:56 +0400
committerEdward Thomson <ethomson@edwardthomson.com>2013-01-12 23:47:56 +0400
commit25743bd7c5f14f2287d9c4fdf953c978e3b16916 (patch)
tree7390d1d2d5d52f549329853903f381e58c1b1de6 /tests-clar/stash
parente2d2c6e57d122f381fb42b7df1c7a12819050490 (diff)
add an index_remove_bypath that removes conflicts, renamed add_from_workdir to match
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 2af95c737..16e3d77ac 100644
--- a/tests-clar/stash/drop.c
+++ b/tests-clar/stash/drop.c
@@ -34,7 +34,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_from_workdir(index, "zero.txt"));
+ cl_git_pass(git_index_add_bypath(index, "zero.txt"));
commit_staged_files(&oid, index, signature);
cl_assert(git_path_exists("stash/zero.txt"));
diff --git a/tests-clar/stash/save.c b/tests-clar/stash/save.c
index e6033e1ef..ea2eb282d 100644
--- a/tests-clar/stash/save.c
+++ b/tests-clar/stash/save.c
@@ -251,8 +251,8 @@ void test_stash_save__cannot_stash_when_there_are_no_local_change(void)
* 'what' and 'who' are being committed.
* 'when' remain untracked.
*/
- cl_git_pass(git_index_add_from_workdir(index, "what"));
- cl_git_pass(git_index_add_from_workdir(index, "who"));
+ cl_git_pass(git_index_add_bypath(index, "what"));
+ cl_git_pass(git_index_add_bypath(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 86a741853..f462a1351 100644
--- a/tests-clar/stash/stash_helpers.c
+++ b/tests-clar/stash/stash_helpers.c
@@ -46,10 +46,10 @@ void setup_stash(git_repository *repo, git_signature *signature)
cl_git_mkfile("stash/.gitignore", "*.ignore\n");
- 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_add_bypath(index, "what"));
+ cl_git_pass(git_index_add_bypath(index, "how"));
+ cl_git_pass(git_index_add_bypath(index, "who"));
+ cl_git_pass(git_index_add_bypath(index, ".gitignore"));
cl_git_pass(git_index_write(index));
commit_staged_files(&commit_oid, index, signature);
@@ -58,8 +58,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_from_workdir(index, "what"));
- cl_git_pass(git_index_add_from_workdir(index, "how"));
+ cl_git_pass(git_index_add_bypath(index, "what"));
+ cl_git_pass(git_index_add_bypath(index, "how"));
cl_git_pass(git_index_write(index));
cl_git_rewritefile("stash/what", "see you later\n"); /* bc99dc98b3eba0e9157e94769cd4d49cb49de449 */