X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-cvsexportcommit.perl;h=e6bf25232c4ec27fc98f78e076678ae4d0a524c1;hb=733137496aee6b74e49bd74d342efce8a3d2e95e;hp=59b672213bfc36f95db089f0e13bafc1c2f2ed71;hpb=71ee7fd15457a0252c089420b5b66de266dcbd2f;p=git.git diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl index 59b672213..e6bf25232 100755 --- a/git-cvsexportcommit.perl +++ b/git-cvsexportcommit.perl @@ -1,6 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl +use 5.008; use strict; +use warnings; use Getopt::Std; use File::Temp qw(tempdir); use Data::Dumper; @@ -28,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}); }