From: Junio C Hamano Date: Wed, 29 Sep 2010 20:49:23 +0000 (-0700) Subject: Merge branch 'bc/fortran-userdiff' X-Git-Tag: v1.7.4-rc0~202 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/083dd39ed4477dc24473986f92e1a1b01f0cfc79?ds=inline;hp=-c Merge branch 'bc/fortran-userdiff' * bc/fortran-userdiff: userdiff.c: add builtin fortran regex patterns --- 083dd39ed4477dc24473986f92e1a1b01f0cfc79 diff --combined Documentation/gitattributes.txt index ed03e2a4aa,fbf507a7ee..c80ca5da43 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@@ -62,21 -62,14 +62,21 @@@ consults `$GIT_DIR/info/attributes` fil precedence), `.gitattributes` file in the same directory as the path in question, and its parent directories up to the toplevel of the work tree (the further the directory that contains `.gitattributes` -is from the path in question, the lower its precedence). +is from the path in question, the lower its precedence). Finally +global and system-wide files are considered (they have the lowest +precedence). If you wish to affect only a single repository (i.e., to assign -attributes to files that are particular to one user's workflow), then +attributes to files that are particular to +one user's workflow for that repository), then attributes should be placed in the `$GIT_DIR/info/attributes` file. Attributes which should be version-controlled and distributed to other repositories (i.e., attributes of interest to all users) should go into -`.gitattributes` files. +`.gitattributes` files. Attributes that should affect all repositories +for a single user should be placed in a file specified by the +`core.attributesfile` configuration option (see linkgit:git-config[1]). +Attributes for all users on a system should be placed in the +`$(prefix)/etc/gitattributes` file. Sometimes you would need to override an setting of an attribute for a path to `unspecified` state. This can be done by listing @@@ -484,6 -477,8 +484,8 @@@ patterns are available - `csharp` suitable for source code in the C# language. + - `fortran` suitable for source code in the Fortran language. + - `html` suitable for HTML/XHTML documents. - `java` suitable for source code in the Java language. diff --combined t/t4018-diff-funcname.sh index c8e19372b0,9a57898339..0a61b57b5f --- a/t/t4018-diff-funcname.sh +++ b/t/t4018-diff-funcname.sh @@@ -32,18 -32,18 +32,18 @@@ EO sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java - builtin_patterns="bibtex cpp csharp html java objc pascal php python ruby tex" + builtin_patterns="bibtex cpp csharp fortran html java objc pascal php python ruby tex" for p in $builtin_patterns do test_expect_success "builtin $p pattern compiles" ' echo "*.java diff=$p" > .gitattributes && - ! ( git diff --no-index Beer.java Beer-correct.java 2>&1 | - grep "fatal" > /dev/null ) + ! { git diff --no-index Beer.java Beer-correct.java 2>&1 | + grep "fatal" > /dev/null; } ' test_expect_success "builtin $p wordRegex pattern compiles" ' - ! ( git diff --no-index --word-diff \ + ! { git diff --no-index --word-diff \ Beer.java Beer-correct.java 2>&1 | - grep "fatal" > /dev/null ) + grep "fatal" > /dev/null; } ' done