diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-01-12 23:34:21 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-12 23:34:21 -0800 |
commit | 96e33609974a79e6826dc62d008a8bc9c0923612 (patch) | |
tree | 53048556a2ef594a170a19f1a72a2faf2a82cd56 | |
parent | bdb8cb52962522e5444241242110780fc6a19c4f (diff) | |
parent | 37495eef4c6071fa124911753cfca3690ea4bf96 (diff) | |
download | git-96e33609974a79e6826dc62d008a8bc9c0923612.tar.gz |
Merge branch 'ss/maint-msys-cvsexportcommit'
* ss/maint-msys-cvsexportcommit:
git-cvsexportcommit: Fix calling Perl's rel2abs() on MSYS
t9200: On MSYS, do not pass Windows-style paths to CVS
-rwxr-xr-x | git-cvsexportcommit.perl | 7 | ||||
-rwxr-xr-x | t/t9200-git-cvsexportcommit.sh | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl index 39a426e067..e6bf25232c 100755 --- a/git-cvsexportcommit.perl +++ b/git-cvsexportcommit.perl @@ -30,6 +30,13 @@ if ($opt_w || $opt_W) { chomp($gd); $ENV{GIT_DIR} = $gd; } + + # On MSYS, convert a Windows-style path to an MSYS-style path + # so that rel2abs() below works correctly. + if ($^O eq 'msys') { + $ENV{GIT_DIR} =~ s#^([[:alpha:]]):/#/$1/#; + } + # Make sure GIT_DIR is absolute $ENV{GIT_DIR} = File::Spec->rel2abs($ENV{GIT_DIR}); } diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh index 41db05cb4a..518358aa64 100755 --- a/t/t9200-git-cvsexportcommit.sh +++ b/t/t9200-git-cvsexportcommit.sh @@ -19,9 +19,9 @@ then test_done fi -CVSROOT=$(pwd)/cvsroot -CVSWORK=$(pwd)/cvswork -GIT_DIR=$(pwd)/.git +CVSROOT=$PWD/cvsroot +CVSWORK=$PWD/cvswork +GIT_DIR=$PWD/.git export CVSROOT CVSWORK GIT_DIR rm -rf "$CVSROOT" "$CVSWORK" |