Re: [PATCHv2] Porting resolve_relative_url from shell to C
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Dec 17, 2015, 07:47 UTC
- Message-ID
- <56726886.6060305@web.de>
- In-Reply-To
- <1450311999-3992-1-git-send-email-sbeller@google.com>
On 17.12.15 01:26, Stefan Beller wrote:
Show 27 quoted lines
> A new version of the patch, which spells out more its intent and
> may actually work in Windows.
>
> Any comment welcome,
> Thanks,
> Stefan
>
> Stefan Beller (1):
> submodule: Port resolve_relative_url from shell to C
>
> builtin/submodule--helper.c | 151 ++++++++++++++++++++++++++++++++++++++++++++
> git-submodule.sh | 81 ++----------------------
> 2 files changed, 155 insertions(+), 77 deletions(-)
>
> interdiff to previous version:
>
> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
> index f48b5b5..b925bed 100644
> --- a/builtin/submodule--helper.c
> +++ b/builtin/submodule--helper.c
> @@ -31,6 +31,36 @@ static const char *get_default_remote(void)
> return xstrdup(dest);
> }
>
> +static int has_same_dir_prefix(const char *str, const char **out)
> +{
> +#ifdef GIT_WINDOWS_NATIVEShould that be if defined(GIT_WINDOWS_NATIVE) || defined(__CYGWIN__)