git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Fix dir sep handling of GIT_ASKPASS on Windows

From
András Kucsma <r0maikx02b@gmail.com>
Date
Mar 25, 2020, 17:09 UTC
Message-ID
<CANPdQvKbgisOQatrwcY66Asodxi__feaVOvoJe2j9qvHcrbZBQ@mail.gmail.com>
In-Reply-To
<20200325163540.vdc7l72fke7yqryb@tb-raspi4>
On Wed, Mar 25, 2020 at 5:35 PM Torsten Bögershausen <tboegi@web.de> wrote:
Show 11 quoted lines
>
> Thanks for working on this. I have 1 or 2 nits/questions, please see below.
>
> On Wed, Mar 25, 2020 at 01:45:10PM +0000, András Kucsma via GitGitGadget wrote:
> > From: Andras Kucsma <r0maikx02b@gmail.com>
> >
> > On Windows with git installed through cygwin, GIT_ASKPASS failed to run
>
> My understanding is, that git under cygwin needs this patch (so to say),
> but isn't it so, that even Git for Windows has the same issue ?
> The headline of the patch and the indicate so.

Git for Windows does not have this issue, because there GIT_WINDOWS_NATIVE is defined, which is not true under Cygwin: https://github.com/git/git/blob/274b9cc2/git-compat-util.h#L157-L165

You can see in start_command() that there are separate implementations based on GIT_WINDOWS_NATIVE. The problematic code is in prepare_cmd, which is not called in the branch where GIT_WINDOWS_NATIVE is defined: https://github.com/git/git/blob/274b9cc2/run-command.c#L740

This means, that cygwin is running in the Unix-like branch of the code, even though it supports backslashes in its paths.

Previous: Torsten BögershausenNext: Junio C Hamano
Message 5 of 13 in “Fix dir sep handling of GIT_ASKPASS on Windows”
  1. Fix dir sep handling of GIT_ASKPASS on WindowsAndrás Kucsma via GitGitGadget, Mar 23, 2020
  2. Junio C HamanoMar 24, 2020
  3. Fix dir sep handling of GIT_ASKPASS on WindowsAndrás Kucsma via GitGitGadget, Mar 25, 2020
  4. Torsten BögershausenMar 25, 2020
  5. András KucsmaMar 25, 2020
  6. Junio C HamanoMar 26, 2020
  7. Junio C HamanoMar 26, 2020
  8. András KucsmaMar 27, 2020
  9. run-command: trigger PATH lookup properly on CygwinAndrás Kucsma via GitGitGadget, Mar 27, 2020
  10. Junio C HamanoMar 27, 2020
  11. András KucsmaMar 27, 2020
  12. Andreas SchwabMar 27, 2020
  13. Junio C HamanoMar 27, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.