Git.pm: stop assuming that absolute paths start with a slash
commit888ab716adff5babae718e4e4cb83b3c3a5f1bc5
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 26 Jan 2016 14:34:35 +0000 (26 15:34 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 Jan 2016 21:42:59 +0000 (26 13:42 -0800)
tree59f22c2b5c9b67283428ff738cac612ac2aabe57
parentb640b77fea7db4c6eb667abf8e9a2b21cf0e72f5
Git.pm: stop assuming that absolute paths start with a slash

On Windows, absolute paths never start with a slash, unless a POSIX
emulation layer is used. The latter is the case for MSYS2's Perl that
Git for Windows leverages. However, in the tests we also go through
plain `git.exe`, which does *not* leverage the POSIX emulation layer,
and therefore the paths we pass to Perl may actually be DOS-style paths
such as C:/Program Files/Git.

So let's just use Perl's own way to test whether a given path is
absolute or not instead of home-brewing our own.

This patch partially fixes t7800 and t9700 when running in Git for
Windows' SDK.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perl/Git.pm