Skip to content

Commit 06d67b8

Browse files
committed
Sync with 1.8.1.5
2 parents 443d803 + e6363a4 commit 06d67b8

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

Documentation/RelNotes/1.8.1.5.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Fixes since v1.8.1.4
88
the command line where an option is expected, the option parser
99
used just one byte of the unknown letter when reporting an error.
1010

11+
* In v1.8.1, the attribute parser was tightened too restrictive to
12+
error out upon seeing an entry that begins with an ! (exclamation),
13+
which may confuse users to expect a "negative match", which does
14+
not exist. This has been demoted to a warning; such an entry is
15+
still ignored.
16+
1117
* "git apply --summary" has been taught to make sure the similarity
1218
value shown in its output is sensible, even when the input had a
1319
bogus value.

Documentation/git.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from 'master'
4343
branch of the `git.git` repository.
4444
Documentation for older releases are available here:
4545

46-
* link:v1.8.1.4/git.html[documentation for release 1.8.1.4]
46+
* link:v1.8.1.5/git.html[documentation for release 1.8.1.5]
4747

4848
* release notes for
49+
link:RelNotes/1.8.1.5.txt[1.8.1.5],
4950
link:RelNotes/1.8.1.4.txt[1.8.1.4],
5051
link:RelNotes/1.8.1.3.txt[1.8.1.3],
5152
link:RelNotes/1.8.1.2.txt[1.8.1.2],

Documentation/githooks.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ preceding SP is also omitted. Currently, no commands pass any
365365
'extra-info'.
366366

367367
The hook always runs after the automatic note copying (see
368-
"notes.rewrite.<command>" in linkgit:git-config.txt) has happened, and
368+
"notes.rewrite.<command>" in linkgit:git-config.txt[1]) has happened, and
369369
thus has access to these notes.
370370

371371
The following command-specific comments apply:

attr.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,11 @@ static struct match_attr *parse_attr_line(const char *line, const char *src,
255255
&res->u.pat.patternlen,
256256
&res->u.pat.flags,
257257
&res->u.pat.nowildcardlen);
258-
if (res->u.pat.flags & EXC_FLAG_NEGATIVE)
259-
die(_("Negative patterns are forbidden in git attributes\n"
260-
"Use '\\!' for literal leading exclamation."));
258+
if (res->u.pat.flags & EXC_FLAG_NEGATIVE) {
259+
warning(_("Negative patterns are ignored in git attributes\n"
260+
"Use '\\!' for literal leading exclamation."));
261+
return NULL;
262+
}
261263
}
262264
res->is_macro = is_macro;
263265
res->num_attr = num_attr;

t/t0003-attributes.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ test_expect_success 'root subdir attribute test' '
198198

199199
test_expect_success 'negative patterns' '
200200
echo "!f test=bar" >.gitattributes &&
201-
test_must_fail git check-attr test -- f
201+
git check-attr test -- '"'"'!f'"'"' 2>errors &&
202+
test_i18ngrep "Negative patterns are ignored" errors
202203
'
203204

204205
test_expect_success 'patterns starting with exclamation' '

0 commit comments

Comments
 (0)