Skip to content

Commit

Permalink
Merge branch 'ss/maint-msys-cvsexportcommit'
Browse files Browse the repository at this point in the history
* ss/maint-msys-cvsexportcommit:
  git-cvsexportcommit: Fix calling Perl's rel2abs() on MSYS
  t9200: On MSYS, do not pass Windows-style paths to CVS
  • Loading branch information
Junio C Hamano committed Jan 13, 2012
2 parents bdb8cb5 + 37495ee commit 96e3360
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions git-cvsexportcommit.perl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
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});
}
Expand Down
6 changes: 3 additions & 3 deletions t/t9200-git-cvsexportcommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 96e3360

Please sign in to comment.