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
This commit is contained in:
Junio C Hamano 2012-01-12 23:34:21 -08:00
commit 96e3360997
2 changed files with 10 additions and 3 deletions

View File

@ -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});
}

View File

@ -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"