Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-13 09:30:05 +0400
committerJunio C Hamano <junkio@cox.net>2007-04-14 19:57:06 +0400
commit35ebfd6a0cd71795c4fa510b99e55ad89fb654f1 (patch)
treea9cc59a9fb5476b5fc80d1de577c6eb06b3c8ffe /t/t0020-crlf.sh
parentd0bfd026a8241d544c339944976927b388d61a5e (diff)
Define 'crlf' attribute.
This defines the semantics of 'crlf' attribute as an example. When a path has this attribute unset (i.e. '!crlf'), autocrlf line-end conversion is not applied. Eventually we would want to let users to build a pipeline of processing to munge blob data to filesystem format (and in the other direction) based on combination of attributes, and at that point the mechanism in convert_to_{git,working_tree}() that looks at 'crlf' attribute needs to be enhanced. Perhaps the existing 'crlf' would become the first step in the input chain, and the last step in the output chain. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t0020-crlf.sh')
-rwxr-xr-xt/t0020-crlf.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 723b29ad17..600dcd30a0 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -214,4 +214,28 @@ test_expect_success 'apply patch --index (autocrlf=true)' '
}
'
+test_expect_success '.gitattributes says two is binary' '
+
+ echo "two !crlf" >.gitattributes &&
+ rm -f tmp one dir/two &&
+ git repo-config core.autocrlf true &&
+ git read-tree --reset -u HEAD &&
+
+ if remove_cr dir/two >/dev/null
+ then
+ echo "Huh?"
+ false
+ else
+ : happy
+ fi &&
+
+ if remove_cr one >/dev/null
+ then
+ : happy
+ else
+ echo "Huh?"
+ false
+ fi
+'
+
test_done