Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-27 21:33:56 +0300
committerJunio C Hamano <gitster@pobox.com>2018-02-27 21:33:56 +0300
commit796a788a1c1a2f6a93763312a840d7ed67a8e32f (patch)
tree6cdb37210290324be042c9aa63c62313e3abe52b /builtin
parent14599b48c0a145452db4363f4eee4d3fc6187d05 (diff)
parentd60771e93046e9e11183c6ff1fcafd334f8c0453 (diff)
Merge branch 'rs/check-ignore-multi'
"git check-ignore" with multiple paths got confused when one is a file and the other is a directory, which has been fixed. * rs/check-ignore-multi: check-ignore: fix mix of directories and other file types
Diffstat (limited to 'builtin')
-rw-r--r--builtin/check-ignore.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index 3e280b9c7a..ec9a959e08 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -72,7 +72,7 @@ static int check_ignore(struct dir_struct *dir,
{
const char *full_path;
char *seen;
- int num_ignored = 0, dtype = DT_UNKNOWN, i;
+ int num_ignored = 0, i;
struct exclude *exclude;
struct pathspec pathspec;
@@ -104,6 +104,7 @@ static int check_ignore(struct dir_struct *dir,
full_path = pathspec.items[i].match;
exclude = NULL;
if (!seen[i]) {
+ int dtype = DT_UNKNOWN;
exclude = last_exclude_matching(dir, &the_index,
full_path, &dtype);
}