Skip to content

Commit 96e3360

Browse files
committed
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
2 parents bdb8cb5 + 37495ee commit 96e3360

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

git-cvsexportcommit.perl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
chomp($gd);
3131
$ENV{GIT_DIR} = $gd;
3232
}
33+
34+
# On MSYS, convert a Windows-style path to an MSYS-style path
35+
# so that rel2abs() below works correctly.
36+
if ($^O eq 'msys') {
37+
$ENV{GIT_DIR} =~ s#^([[:alpha:]]):/#/$1/#;
38+
}
39+
3340
# Make sure GIT_DIR is absolute
3441
$ENV{GIT_DIR} = File::Spec->rel2abs($ENV{GIT_DIR});
3542
}

t/t9200-git-cvsexportcommit.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ then
1919
test_done
2020
fi
2121

22-
CVSROOT=$(pwd)/cvsroot
23-
CVSWORK=$(pwd)/cvswork
24-
GIT_DIR=$(pwd)/.git
22+
CVSROOT=$PWD/cvsroot
23+
CVSWORK=$PWD/cvswork
24+
GIT_DIR=$PWD/.git
2525
export CVSROOT CVSWORK GIT_DIR
2626

2727
rm -rf "$CVSROOT" "$CVSWORK"

0 commit comments

Comments
 (0)