summaryrefslogtreecommitdiff
path: root/t/t4018-diff-funcname.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-07 08:49:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-07 08:49:58 (GMT)
commite0e324a4dc18a4341e1320a7cfac9733d81f8b0b (patch)
treec7847d99b6ae642e96e1e512ab116c7d9daa7e26 /t/t4018-diff-funcname.sh
parentf258475a6ede3617ae768b69e33f78cbab8312de (diff)
downloadgit-e0e324a4dc18a4341e1320a7cfac9733d81f8b0b.zip
git-e0e324a4dc18a4341e1320a7cfac9733d81f8b0b.tar.gz
git-e0e324a4dc18a4341e1320a7cfac9733d81f8b0b.tar.bz2
Fix configuration syntax to specify customized hunk header patterns.
This updates the hunk header customization syntax. The special case 'funcname' attribute is gone. You assign the name of the type of contents to path's "diff" attribute as a string value in .gitattributes like this: *.java diff=java *.perl diff=perl *.doc diff=doc If you supply "diff.<name>.funcname" variable via the configuration mechanism (e.g. in $HOME/.gitconfig), the value is used as the regexp set to find the line to use for the hunk header (the variable is called "funcname" because such a line typically is the one that has the name of the function in programming language source text). If there is no such configuration, built-in default is used, if any. Currently there are two default patterns: default and java. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018-diff-funcname.sh')
-rw-r--r--t/t4018-diff-funcname.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index dc7a47b..f9db81d 100644
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -38,12 +38,12 @@ test_expect_success 'default behaviour' '
'
test_expect_success 'preset java pattern' '
- echo "*.java funcname=java" >.gitattributes &&
+ echo "*.java diff=java" >.gitattributes &&
git diff Beer.java Beer-correct.java |
grep "^@@.*@@ public static void main("
'
-git config funcname.java '!static
+git config diff.java.funcname '!static
!String
[^ ].*s.*'
@@ -53,7 +53,7 @@ test_expect_success 'custom pattern' '
'
test_expect_success 'last regexp must not be negated' '
- git config diff.functionnameregexp "!static" &&
+ git config diff.java.funcname "!static" &&
! git diff Beer.java Beer-correct.java
'