diff options
| author | Junio C Hamano <gitster@pobox.com> | 2008-04-22 23:37:06 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2008-04-22 23:37:06 -0700 |
| commit | d6958a1a32814af69a7571daa45252018c61f969 (patch) | |
| tree | 355fe5cdd4749e67d8979f80f7dcdc649b9aba41 /attr.c | |
| parent | 491b1b11213c373a3e91004b1ab775d7e52ac1f3 (diff) | |
| parent | 4f7ec7970874d09be162bc7f16415a0ec2d36ae5 (diff) | |
| download | git-d6958a1a32814af69a7571daa45252018c61f969.tar.gz | |
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
svn-git: Use binmode for reading/writing binary rev maps
diff options documentation: refer to --diff-filter in --name-status
git-svn bug with blank commits and author file
archive.c: format_subst - fixed bogus argument to memchr
copy.c: copy_fd - correctly report write errors
gitattributes: Fix subdirectory attributes specified from root directory
Diffstat (limited to 'attr.c')
| -rw-r--r-- | attr.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -546,7 +546,9 @@ static int path_matches(const char *pathname, int pathlen, (baselen && pathname[baselen] != '/') || strncmp(pathname, base, baselen)) return 0; - return fnmatch(pattern, pathname + baselen + 1, FNM_PATHNAME) == 0; + if (baselen != 0) + baselen++; + return fnmatch(pattern, pathname + baselen, FNM_PATHNAME) == 0; } static int fill_one(const char *what, struct match_attr *a, int rem) |
