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.