From: Sebastian Schuberth <hidden> Date: 2016-06-15 22:52:46
This tiny series makes the long-pending t9200-git-cvsexportcommit.sh pass on MSYS.
Sebastian Schuberth (2):
t9200: On MSYS, do not pass Windows-style paths to CVS
git-cvsexportcommit: Fix calling Perl's rel2abs() on MSYS
git-cvsexportcommit.perl | 7 +++++++
t/t9200-git-cvsexportcommit.sh | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
--
1.7.9.rc0.5096.g30a61
From: Sebastian Schuberth <hidden> Date: 2016-06-15 22:52:46
For details, see the commit message of 4114156ae9. Note that while using
$PWD as part of GIT_DIR is not required here, it does no harm and it is
more consistent. In addition, on MSYS using an environment variable should
be slightly faster than spawning an external executable.
Signed-off-by: Sebastian Schuberth <redacted>
---
t/t9200-git-cvsexportcommit.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
From: Sebastian Schuberth <hidden> Date: 2016-06-15 22:52:46
Due to MSYS path mangling GIT_DIR contains a Windows-style path when
checked inside a Perl script even if GIT_DIR was previously set to an
MSYS-style path in a shell script. So explicitly convert to an MSYS-style
path before calling Perl's rel2abs() to make it work.
This fix was inspired by a very similar patch in WebKit:
http://trac.webkit.org/changeset/76255/trunk/Tools/Scripts/commit-log-editor
Signed-off-by: Sebastian Schuberth <redacted>
---
git-cvsexportcommit.perl | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
@@ -30,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($^Oeq'msys'){+$ENV{GIT_DIR}=~s#^([[:alpha:]]):/#/$1/#;+}+# Make sure GIT_DIR is absolute$ENV{GIT_DIR}=File::Spec->rel2abs($ENV{GIT_DIR});}
From: Pat Thoyts <hidden> Date: 2016-06-15 22:52:46
On 11 January 2012 09:21, Sebastian Schuberth [off-list ref] wrote:
quoted hunk
Due to MSYS path mangling GIT_DIR contains a Windows-style path when
checked inside a Perl script even if GIT_DIR was previously set to an
MSYS-style path in a shell script. So explicitly convert to an MSYS-style
path before calling Perl's rel2abs() to make it work.
This fix was inspired by a very similar patch in WebKit:
http://trac.webkit.org/changeset/76255/trunk/Tools/Scripts/commit-log-editor
Signed-off-by: Sebastian Schuberth <redacted>
---
git-cvsexportcommit.perl | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)