diff options
| author | Russell Belfer <rb@github.com> | 2014-04-01 21:30:52 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2014-04-01 21:30:52 -0700 |
| commit | ea1ca3c9216ad72b24a198cfdf4c4eb0d037462f (patch) | |
| tree | 45b86ec2eae9c4ec317da33ad04f8cd6f038c04b | |
| parent | f28e4c97b38c1ec60dc6ce6e5306067ad24aeb8e (diff) | |
| download | libgit2-ea1ca3c9216ad72b24a198cfdf4c4eb0d037462f.tar.gz | |
Fix skipping content of contained repos
When doing a diff for use in status, we should never show the
content of a git repository contained inside another one. The
logic to do this was looking for a .git directory and so when a
gitlink plain .git file was used, it was failing to exclude the
directory content.
| -rw-r--r-- | src/diff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c index 25c5937e6..484273f4a 100644 --- a/src/diff.c +++ b/src/diff.c @@ -880,8 +880,10 @@ static int handle_unmatched_new_item( git_buf *full = NULL; if (git_iterator_current_workdir_path(&full, info->new_iter) < 0) return -1; - if (full && git_path_contains_dir(full, DOT_GIT)) + if (full && git_path_contains(full, DOT_GIT)) { + /* TODO: warning if not a valid git repository */ recurse_into_dir = false; + } } /* still have to look into untracked directories to match core git - |
