git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, git-packagers@googlegroups.com,
	git-for-windows@googlegroups.com
Subject: Re: [ANNOUNCE] Git v2.16.0-rc1
Date: Sat, 6 Jan 2018 23:01:22 +0100 (STD)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.1801062248160.1337@wbunaarf-fpuvaqryva.tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1801061354430.1337@wbunaarf-fpuvaqryva.tvgsbejvaqbjf.bet>

Hi again,

On Sat, 6 Jan 2018, Johannes Schindelin wrote:

> On Fri, 5 Jan 2018, Junio C Hamano wrote:
> 
> > A release candidate Git v2.16.0-rc1 is now available for testing
> > at the usual places.  It is comprised of 455 non-merge commits
> > since v2.15.0, contributed by 79 people, 23 of which are new faces.
> 
> I rebased Git for Windows' thicket of patch series on top, and I already
> got this when running t0021:
> 
> 	# failed 10 among 26 test(s)
> 	1..26

I actually was able to figure it out: it was the GITPERLLIB problem I
described earlier, where we run (once again) into trouble with Git's
expectations that everything behaves like Linux, including colon-separated
path lists.

The test suite passed, so I kicked off a build which should be available
soon at:

https://github.com/git-for-windows/git/releases/tag/v2.16.0-rc1.windows.1

The patch to work around the GITPERLLIB issue looks like this:

-- snipsnap --
Subject: [PATCH] mingw: handle GITPERLLIB in t0021 in a Windows-compatible
way

Git's assumption that all path lists are colon-separated is not only
wrong on Windows, it is not even an assumption that is compatible with
POSIX.

In the interest of time, let's not try to fix this properly but simply
work around the obvious breakage on Windows, where the MSYS2 Bash used
by Git for Windows to interpret the Git's Unix shell scripts will
automagically convert path lists in the environment to
semicolon-separated lists of Windows paths (with drive letter and the
corresponding colon and all that jazz).

In other words, we simply look whether there is a semicolon in
GITPERLLIB and split by semicolons if found instead of colons. This is
not fool-proof, of course, as the path list could consist of a single
path. But that is not the case in Git for Windows' test suite, there are
always two paths in GITPERLLIB.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t0021/rot13-filter.pl | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/t/t0021/rot13-filter.pl b/t/t0021/rot13-filter.pl
index f1678851de9..470107248eb 100644
--- a/t/t0021/rot13-filter.pl
+++ b/t/t0021/rot13-filter.pl
@@ -31,7 +31,22 @@
 #
 
 use 5.008;
-use lib (split(/:/, $ENV{GITPERLLIB}));
+sub gitperllib {
+	# Git assumes that all path lists are Unix-y colon-separated ones. But
+	# when the Git for Windows executes the test suite, its MSYS2 Bash
+	# calls git.exe, and colon-separated path lists are converted into
+	# Windows-y semicolon-separated lists of *Windows* paths (which
+	# naturally contain a colon after the drive letter, so splitting by
+	# colons simply does not cut it).
+	#
+	# Detect semicolon-separated path list and handle them appropriately.
+
+	if ($ENV{GITPERLLIB} =~ /;/) {
+		return split(/;/, $ENV{GITPERLLIB});
+	}
+	return split(/:/, $ENV{GITPERLLIB});
+}
+use lib (gitperllib());
 use strict;
 use warnings;
 use IO::File;
-- 
2.16.0.rc0.windows.1



  reply	other threads:[~2018-01-06 22:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 23:30 [ANNOUNCE] Git v2.16.0-rc1 Junio C Hamano
2018-01-06 12:59 ` Johannes Schindelin
2018-01-06 22:01   ` Johannes Schindelin [this message]
2018-01-09 21:42     ` Junio C Hamano
2018-01-09 23:55       ` Junio C Hamano
2018-01-10 17:40         ` Johannes Schindelin
2018-01-10 20:09           ` Junio C Hamano
2018-01-10 17:37       ` Johannes Schindelin
2018-01-10 17:54         ` [git-for-windows] " Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.1801062248160.1337@wbunaarf-fpuvaqryva.tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git-for-windows@googlegroups.com \
    --cc=git-packagers@googlegroups.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).