summaryrefslogtreecommitdiff
path: root/git-cvsexportcommit.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-01-12 23:34:21 -0800
committerJunio C Hamano <gitster@pobox.com>2012-01-12 23:34:21 -0800
commit96e33609974a79e6826dc62d008a8bc9c0923612 (patch)
tree53048556a2ef594a170a19f1a72a2faf2a82cd56 /git-cvsexportcommit.perl
parentbdb8cb52962522e5444241242110780fc6a19c4f (diff)
parent37495eef4c6071fa124911753cfca3690ea4bf96 (diff)
downloadgit-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
Diffstat (limited to 'git-cvsexportcommit.perl')
-rwxr-xr-xgit-cvsexportcommit.perl7
1 files changed, 7 insertions, 0 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});
}