summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorHenrik Grubbström <grubba@grubba.org>2010-04-06 12:46:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-11 01:36:00 (GMT)
commit969f9d73228f233aff071a0d07ba28afdb79dbc4 (patch)
treeade287b4e60d0f2e4b07beaa1a58422537c35542 /t
parent426c27b7c0a415cec451d8fd369ecd5a86adf85e (diff)
downloadgit-969f9d73228f233aff071a0d07ba28afdb79dbc4.zip
git-969f9d73228f233aff071a0d07ba28afdb79dbc4.tar.gz
git-969f9d73228f233aff071a0d07ba28afdb79dbc4.tar.bz2
attr: Allow multiple changes to an attribute on the same line.
When using macros it isn't inconceivable to have an attribute being set by a macro, and then being reset explicitly. Signed-off-by: Henrik Grubbström <grubba@grubba.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0003-attributes.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 1c77192..bd9c8de 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -22,6 +22,8 @@ test_expect_success 'setup' '
(
echo "f test=f"
echo "a/i test=a/i"
+ echo "onoff test -test"
+ echo "offon -test test"
) >.gitattributes &&
(
echo "g test=a/g" &&
@@ -44,6 +46,8 @@ test_expect_success 'attribute test' '
attr_check b/g unspecified &&
attr_check a/b/h a/b/h &&
attr_check a/b/d/g "a/b/d/*"
+ attr_check onoff unset
+ attr_check offon set
'
@@ -58,6 +62,8 @@ a/b/g: test: a/b/g
b/g: test: unspecified
a/b/h: test: a/b/h
a/b/d/g: test: a/b/d/*
+onoff: test: unset
+offon: test: set
EOF
sed -e "s/:.*//" < expect | git check-attr --stdin test > actual &&