(unknown)
From: Don Slutz <hidden>
Date: 2016-06-15 22:46:44
Subsystem:
the rest · Maintainer:
Linus Torvalds
From 96f9b68bba7ad2ec2c9623709b417f27c2831790 Mon Sep 17 00:00:00 2001
From: Don Slutz <redacted> Date: Fri, 1 May 2009 15:32:18 -0400 Subject: [PATCH 1/6] Add core.autocrlf=true on cygwin by default during tests It can be disabled or enabled by using the GIT_TEST_AUTO_CRLF environment variable. Signed-off-by: Don Slutz <redacted> --- t/test-lib.sh | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index dad1437..218bd82 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh@@ -119,6 +119,17 @@ do esac done +# Switch to core.autolf = true on cygwin but only by default +case $(uname -s) in +*CYGWIN*) + GIT_TEST_AUTO_CRLF=${GIT_TEST_AUTO_CRLF:-true} + test "$debug" = "" || + echo "Test in mode" $(cygpath --mode . | cut -d: -f2-) "mount" + ;; +*) + ;; +esac + if test -n "$color"; then say_color () { (
@@ -493,6 +504,11 @@ test_create_repo () { cd "$repo" || error "Cannot setup test environment" "$GIT_EXEC_PATH/git-init" "--template=$TEST_DIRECTORY/../templates/blt/" >&3 2>&4 || error "cannot run git init -- have you built things yet?" + test ! -z "$GIT_TEST_AUTO_CRLF" && + test_debug "echo Switching to autocrlf=$GIT_TEST_AUTO_CRLF" && { + git config core.autocrlf $GIT_TEST_AUTO_CRLF || + error "Failed to switch to autocrlf=$GIT_TEST_AUTO_CRLF" + } mv .git/hooks .git/hooks-disabled cd "$owd" }
--
1.6.3.15.g49878