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-03-25 23:37:05 +0400
committerRussell Belfer <rb@github.com>2014-03-25 23:37:05 +0400
commitd3bc95fd664095a0c8dfcdf99f62741b1ecd6ffc (patch)
treee152a3bf6e448d04752821c17653357a2ae36688 /src/iterator.c
parentf210cb5b1442f82e2f930909d8430f7cc6661c5f (diff)
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.
Diffstat (limited to 'src/iterator.c')
-rw-r--r--src/iterator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/iterator.c b/src/iterator.c
index 401b5de93..e9ec65250 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -1313,8 +1313,8 @@ static int workdir_iterator__update_entry(fs_iterator *fi)
if (error < 0)
giterr_clear();
- /* mark submodule (or any dir with .git) as GITLINK and remove slash */
- if (!error || error == GIT_EEXISTS) {
+ /* mark submodule as GITLINK and remove slash */
+ if (!error) {
fi->entry.mode = S_IFGITLINK;
fi->entry.path[strlen(fi->entry.path) - 1] = '\0';
}