summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ignore.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ignore.c b/src/ignore.c
index c6e4da705..5427efa29 100644
--- a/src/ignore.c
+++ b/src/ignore.c
@@ -534,7 +534,9 @@ int git_ignore_path_is_ignored(
memset(&path, 0, sizeof(path));
memset(&ignores, 0, sizeof(ignores));
- if (git_repository_is_bare(repo))
+ if (!git__suffixcmp(pathname, "/"))
+ dir_flag = GIT_DIR_FLAG_TRUE;
+ else if (git_repository_is_bare(repo))
dir_flag = GIT_DIR_FLAG_FALSE;
if ((error = git_attr_path__init(&path, pathname, workdir, dir_flag)) < 0 ||