From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: valtron <valtron2000@gmail.com>
Cc: git@vger.kernel.org, Brandon Williams <bmwill@google.com>
Subject: Re: Crash on MSYS2 with GIT_WORK_TREE
Date: Wed, 8 Mar 2017 13:03:24 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1703081259150.3767@virtualbox> (raw)
In-Reply-To: <CAFKRc7ysOAOVx-7ww7MLF1qKpuKdJQqAtAhLJcYh3yMD3G2ncA@mail.gmail.com>
Hi valtron,
On Tue, 7 Mar 2017, valtron wrote:
> I only ran into this because of git-gui, where I eventually tracked it
> down to line 1330:
>
> set env(GIT_WORK_TREE) $_gitworktree
As git-gui is a Tcl script, which in turn runs as a pure Windows
application, the path should use backslashes.
> With that line commented out, it works. I'll look into why git-gui
> sets it to a windows-path-with-forward-slashes, but that's a separate
> issue from the crash.
It is... please do contribute your fix when you have one.
> Also, from the stack trace, I think git is still able to understand the
> path, since it appears to correctly convert it to /c/repo, but I might
> be wrong since I haven't look at the code.
Git does not convert the path at all. It is the *MSYS2 runtime* that
converts Windows paths to POSIX paths, if any. And it does so selectively.
The current working directory is always transformed. PATH is always
transformed. Environment variables are transformed *when they look like
Windows paths*. And I am fairly certain that a GIT_WORK_TREE with a colon
and forward-slashes fails that test: the MSYS2 runtime thinks this is not
a Windows path and leaves it alone. Enter your problem.
Ciao,
Johannes
next prev parent reply other threads:[~2017-03-08 12:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 21:28 Crash on MSYS2 with GIT_WORK_TREE valtron
2017-03-07 23:03 ` Johannes Schindelin
2017-03-08 0:51 ` Johannes Schindelin
2017-03-08 1:08 ` valtron
2017-03-08 12:03 ` Johannes Schindelin [this message]
2017-03-08 2:09 ` Brandon Williams
2017-03-08 11:59 ` Johannes Schindelin
2017-03-08 18:46 ` Brandon Williams
2017-03-08 22:19 ` Junio C Hamano
2017-03-08 2:36 ` Junio C Hamano
[not found] ` <xmqqa88w4bbp.fsf@gitster.mtv.corp.google.com>
2017-03-08 15:34 ` Johannes Schindelin
2017-03-08 17:24 ` Junio C Hamano
2017-03-08 1:05 ` Johannes Schindelin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1703081259150.3767@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=valtron2000@gmail.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.
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 NNTP newsgroup(s).