summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-03-01 13:17:18 -0800
committerJunio C Hamano <gitster@pobox.com>2013-03-01 13:17:18 -0800
commit06d67b876642822828596b0b38cda2f61d438335 (patch)
tree67de0d436a69443bf288411323b0ed209a6cb000
parent443d803e0dacd0a1c6700503689f3cd95751aba1 (diff)
parente6363a4992637267ef212d7c709ede17d4122e0d (diff)
downloadgit-06d67b876642822828596b0b38cda2f61d438335.tar.gz
Sync with 1.8.1.5
-rw-r--r--Documentation/RelNotes/1.8.1.5.txt6
-rw-r--r--Documentation/git.txt3
-rw-r--r--Documentation/githooks.txt2
-rw-r--r--attr.c8
-rwxr-xr-xt/t0003-attributes.sh3
5 files changed, 16 insertions, 6 deletions
diff --git a/Documentation/RelNotes/1.8.1.5.txt b/Documentation/RelNotes/1.8.1.5.txt
index 30d30a1cf9..efa68aef22 100644
--- a/Documentation/RelNotes/1.8.1.5.txt
+++ b/Documentation/RelNotes/1.8.1.5.txt
@@ -8,6 +8,12 @@ Fixes since v1.8.1.4
the command line where an option is expected, the option parser
used just one byte of the unknown letter when reporting an error.
+ * In v1.8.1, the attribute parser was tightened too restrictive to
+ error out upon seeing an entry that begins with an ! (exclamation),
+ which may confuse users to expect a "negative match", which does
+ not exist. This has been demoted to a warning; such an entry is
+ still ignored.
+
* "git apply --summary" has been taught to make sure the similarity
value shown in its output is sensible, even when the input had a
bogus value.
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 79aa8cd149..9d29ed5504 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v1.8.1.4/git.html[documentation for release 1.8.1.4]
+* link:v1.8.1.5/git.html[documentation for release 1.8.1.5]
* release notes for
+ link:RelNotes/1.8.1.5.txt[1.8.1.5],
link:RelNotes/1.8.1.4.txt[1.8.1.4],
link:RelNotes/1.8.1.3.txt[1.8.1.3],
link:RelNotes/1.8.1.2.txt[1.8.1.2],
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 8181e4ed2a..eab9b356cd 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -365,7 +365,7 @@ preceding SP is also omitted. Currently, no commands pass any
'extra-info'.
The hook always runs after the automatic note copying (see
-"notes.rewrite.<command>" in linkgit:git-config.txt) has happened, and
+"notes.rewrite.<command>" in linkgit:git-config.txt[1]) has happened, and
thus has access to these notes.
The following command-specific comments apply:
diff --git a/attr.c b/attr.c
index 4657cc233c..e2f9377891 100644
--- a/attr.c
+++ b/attr.c
@@ -255,9 +255,11 @@ static struct match_attr *parse_attr_line(const char *line, const char *src,
&res->u.pat.patternlen,
&res->u.pat.flags,
&res->u.pat.nowildcardlen);
- if (res->u.pat.flags & EXC_FLAG_NEGATIVE)
- die(_("Negative patterns are forbidden in git attributes\n"
- "Use '\\!' for literal leading exclamation."));
+ if (res->u.pat.flags & EXC_FLAG_NEGATIVE) {
+ warning(_("Negative patterns are ignored in git attributes\n"
+ "Use '\\!' for literal leading exclamation."));
+ return NULL;
+ }
}
res->is_macro = is_macro;
res->num_attr = num_attr;
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 43b25137e9..0b98b6f8d0 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -198,7 +198,8 @@ test_expect_success 'root subdir attribute test' '
test_expect_success 'negative patterns' '
echo "!f test=bar" >.gitattributes &&
- test_must_fail git check-attr test -- f
+ git check-attr test -- '"'"'!f'"'"' 2>errors &&
+ test_i18ngrep "Negative patterns are ignored" errors
'
test_expect_success 'patterns starting with exclamation' '