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 08:51:54 +0400
committerRussell Belfer <rb@github.com>2014-04-23 08:51:54 +0400
commit37da368545b28157e625212e8009ec041cc4a4ea (patch)
tree9fac6b09448e10224191507e764263374ed36083 /tests/stash/stash_helpers.c
parent3c1aa4c110d2d4c8c3d941b0e4ba66357172da2e (diff)
Make checkout match diff for untracked/ignored dir
When diff finds an untracked directory, it emulates Git behavior by looking inside the directory to see if there are any untracked items inside it. If there are only ignored items inside the dir, then diff considers it ignored, even if there is no direct ignore rule for it. Checkout was not copying this behavior - when it found an untracked directory, it just treated it as untracked. Unfortunately, when combined with GIT_CHECKOUT_REMOVE_UNTRACKED, this made is seem that checkout (and stash, which uses checkout) was removing ignored items when you had only asked it to remove untracked ones. This commit moves the logic for advancing past an untracked dir while scanning for non-ignored items into an iterator helper fn, and uses that for both diff and checkout.
Diffstat (limited to 'tests/stash/stash_helpers.c')
-rw-r--r--tests/stash/stash_helpers.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/stash/stash_helpers.c b/tests/stash/stash_helpers.c
index 29cb25c5f..ff683eced 100644
--- a/tests/stash/stash_helpers.c
+++ b/tests/stash/stash_helpers.c
@@ -42,7 +42,6 @@ void assert_status(
int status_flags)
{
unsigned int status;
- int error;
if (status_flags < 0)
cl_assert_equal_i(status_flags, git_status_file(&status, repo, path));