From d3bc95fd664095a0c8dfcdf99f62741b1ecd6ffc Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Tue, 25 Mar 2014 12:37:05 -0700 Subject: Update behavior for untracked sub-repos When a directory containing a .git directory (or even just a plain gitlink) was found, libgit2 was going out of its way to treat it specially. This seemed like it was necessary because the diff code was not originally emulating Git's behavior for untracked directories correctly (i.e. scanning for ignored vs untracked items inside). Now that libgit2 diff mimics Git's untracked directory behavior, the special handling for contained Git repos is actually incorrect and this commit rips it out. --- tests/diff/workdir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/diff/workdir.c') diff --git a/tests/diff/workdir.c b/tests/diff/workdir.c index 449dc6363..6128e820e 100644 --- a/tests/diff/workdir.c +++ b/tests/diff/workdir.c @@ -881,7 +881,7 @@ void test_diff_workdir__submodules(void) * only significant difference is that those Added items will show up * as Untracked items in the pure libgit2 diff. * - * Then add in the two extra ignored items "not" and "not-submodule" + * Then add in the two extra untracked items "not" and "not-submodule" * to get the 12 files reported here. */ @@ -890,8 +890,8 @@ void test_diff_workdir__submodules(void) cl_assert_equal_i(0, exp.file_status[GIT_DELTA_ADDED]); cl_assert_equal_i(0, exp.file_status[GIT_DELTA_DELETED]); cl_assert_equal_i(2, exp.file_status[GIT_DELTA_MODIFIED]); - cl_assert_equal_i(2, exp.file_status[GIT_DELTA_IGNORED]); - cl_assert_equal_i(8, exp.file_status[GIT_DELTA_UNTRACKED]); + cl_assert_equal_i(0, exp.file_status[GIT_DELTA_IGNORED]); + cl_assert_equal_i(10, exp.file_status[GIT_DELTA_UNTRACKED]); /* the following numbers match "git diff 873585" exactly */ -- cgit v1.2.1