Git.pm: stop assuming that absolute paths start with a slash

This fixes t7800 with MSys2.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2015-02-22 13:33:35 +00:00
parent b7b6f124d7
commit 940b5b4e69

View File

@@ -188,7 +188,8 @@ sub repository {
};
if ($dir) {
$dir =~ m#^/# or $dir = $opts{Directory} . '/' . $dir;
_verify_require();
File::Spec->file_name_is_absolute($dir) or $dir = $opts{Directory} . '/' . $dir;
$opts{Repository} = abs_path($dir);
# If --git-dir went ok, this shouldn't die either.