diff options
-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" |