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

Re: [PATCH v3] run-command: trigger PATH lookup properly on Cygwin

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2020, 18:04 UTC
Message-ID
<xmqqeetdhdxo.fsf@gitster.c.googlers.com>
In-Reply-To
<pull.587.v3.git.1585269403947.gitgitgadget@gmail.com>
"András Kucsma via GitGitGadget"  <gitgitgadget@gmail.com> writes:
> Subject: Re: [PATCH v3] run-command: trigger PATH lookup properly on Cygwin

You phrased it much better than my earlier attempt. Succinct, accurate and to the point. Good.

Show 18 quoted lines
>  compat/win32/path-utils.h | 11 +++++++++++
>  git-compat-util.h         |  8 ++++++++
>  run-command.c             | 10 +++++-----
>  3 files changed, 24 insertions(+), 5 deletions(-)
>
> diff --git a/compat/win32/path-utils.h b/compat/win32/path-utils.h
> index f2e70872cd2..18eff7899e9 100644
> --- a/compat/win32/path-utils.h
> +++ b/compat/win32/path-utils.h
> @@ -20,6 +20,17 @@ static inline char *win32_find_last_dir_sep(const char *path)
>  	return ret;
>  }
>  #define find_last_dir_sep win32_find_last_dir_sep
> +static inline int win32_has_dir_sep(const char *path)
> +{
> +	/*
> +	 * See how long the non-separator part of the given path is, and
> +	 * if and only if it covers the whole path (i.e. path[len] is NULL),

The name of the ASCII character '\0' is NUL, not NULL (I'll fix it while applying, so no need to resend if you do not have anything else that needs updating).

Otherwise, the patch looks good. 
Thanks.
Previous: András Kucsma via GitGitGadgetNext: András Kucsma
Message 10 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.