From 5e2485846dacb5acd3b6cd084e246c7c9a6d5a13 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Fri, 1 Mar 2013 12:23:57 -0500 Subject: Documentation/githooks: Fix linkgit Signed-off-by: Andrew Wong Signed-off-by: Junio C Hamano diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index b9003fe..4e0d2a0 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -336,7 +336,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." in linkgit:git-config.txt) has happened, and +"notes.rewrite." in linkgit:git-config.txt[1]) has happened, and thus has access to these notes. The following command-specific comments apply: -- cgit v0.10.2-6-g49f6 From 8b1bd024154f0ee0d71a6befe9bbd96462e76abc Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Fri, 1 Mar 2013 21:06:17 +0100 Subject: Make !pattern in .gitattributes non-fatal Before 82dce99 (attr: more matching optimizations from .gitignore, 2012-10-15), .gitattributes did not have any special treatment of a leading '!'. The docs, however, always said The rules how the pattern matches paths are the same as in `.gitignore` files; see linkgit:gitignore[5]. By those rules, leading '!' means pattern negation. So 82dce99 correctly determined that this kind of line makes no sense and should be disallowed. However, users who actually had a rule for files starting with a '!' are in a bad position: before 82dce99 '!' matched that literal character, so it is conceivable that users have .gitattributes with such lines in them. After 82dce99 the unescaped version was disallowed in such a way that git outright refuses to run(!) most commands in the presence of such a .gitattributes. It therefore becomes very hard to fix, let alone work with, such repositories. Let's at least allow the users to fix their repos: change the fatal error into a warning. Reported-by: mathstuf@gmail.com Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano diff --git a/attr.c b/attr.c index 8985c5c..d181d98 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 807b8b8..1035a14 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' ' -- cgit v0.10.2-6-g49f6 From e6363a4992637267ef212d7c709ede17d4122e0d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 1 Mar 2013 13:15:29 -0800 Subject: Git 1.8.1.5 Signed-off-by: Junio C Hamano diff --git a/Documentation/RelNotes/1.8.1.5.txt b/Documentation/RelNotes/1.8.1.5.txt index 30d30a1..efa68ae 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 cbac771..608fa39 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/GIT-VERSION-GEN b/GIT-VERSION-GEN index dcd3595..6f09e2f 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.8.1.4 +DEF_VER=v1.8.1.5 LF=' ' -- cgit v0.10.2-6-g49f6