summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2005-11-02 13:05:45 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-03 00:50:58 (GMT)
commitd317e4384acd5646f2ba44197a531c129b26b57e (patch)
tree29e2eac910f75f58e824d17972a93a52c1a0db47 /t
parent13d1cc3604a1a64cb5a6025bba8af8b74a373963 (diff)
downloadgit-d317e4384acd5646f2ba44197a531c129b26b57e.zip
git-d317e4384acd5646f2ba44197a531c129b26b57e.tar.gz
git-d317e4384acd5646f2ba44197a531c129b26b57e.tar.bz2
remove CR/LF from .gitignore
For everyone cursed by dos/windows line endings (aka CRLF): The code reading the .gitignore files (excludes and excludes per directory) leaves \r in the patterns, which causes fnmatch to fail for no obvious reason. Just remove a "\r" preceding a "\n" unconditionally. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
index 5beaaa3..fde2bb2 100755
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -67,4 +67,16 @@ test_expect_success \
>output &&
diff -u expect output'
+# Test \r\n (MSDOS-like systems)
+echo -ne '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
+
+test_expect_success \
+ 'git-ls-files --others with \r\n line endings.' \
+ 'git-ls-files --others \
+ --exclude=\*.6 \
+ --exclude-per-directory=.gitignore \
+ --exclude-from=.git/ignore \
+ >output &&
+ diff -u expect output'
+
test_done