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:
authorRussell Belfer <rb@github.com>2014-04-23 02:23:39 +0400
committerRussell Belfer <rb@github.com>2014-04-23 02:23:43 +0400
commit3c1aa4c110d2d4c8c3d941b0e4ba66357172da2e (patch)
tree9844c962537bfe04e4c0f8fe8fff9b7014b94958 /tests/stash/save.c
parent24d17de255caa57b01c0c758e6fc81aad493806e (diff)
Failing test for stashing a buried ignored file
Diffstat (limited to 'tests/stash/save.c')
-rw-r--r--tests/stash/save.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/stash/save.c b/tests/stash/save.c
index 5165eeadf..7bbd4c8dc 100644
--- a/tests/stash/save.c
+++ b/tests/stash/save.c
@@ -148,6 +148,19 @@ void test_stash_save__can_include_untracked_files(void)
assert_blob_oid("refs/stash^3:just.ignore", NULL);
}
+void test_stash_save__untracked_skips_ignored(void)
+{
+ cl_git_append2file("stash/.gitignore", "bundle/vendor/\n");
+ cl_must_pass(p_mkdir("stash/bundle", 0777));
+ cl_must_pass(p_mkdir("stash/bundle/vendor", 0777));
+ cl_git_mkfile("stash/bundle/vendor/blah", "contents\n");
+
+ cl_git_pass(git_stash_save(
+ &stash_tip_oid, repo, signature, NULL, GIT_STASH_INCLUDE_UNTRACKED));
+
+ cl_assert(git_path_exists("stash/bundle/vendor/blah"));
+}
+
void test_stash_save__can_include_untracked_and_ignored_files(void)
{
cl_git_pass(git_stash_save(&stash_tip_oid, repo, signature, NULL, GIT_STASH_INCLUDE_UNTRACKED | GIT_STASH_INCLUDE_IGNORED));