Re: [PATCHv2] submodule: Port resolve_relative_url from shell to C

2015-12-17 Thread Eric Sunshine
A rather superficial review... On Wed, Dec 16, 2015 at 7:26 PM, Stefan Beller wrote: > This reimplements the helper function `resolve_relative_url` in shell s/This reimplements/Reimplement/ > in C. This functionality is needed in C for introducing the groups > feature later

Re: [PATCHv2] submodule: Port resolve_relative_url from shell to C

2015-12-17 Thread Johannes Sixt
Am 17.12.2015 um 01:26 schrieb Stefan Beller: > This reimplements the helper function `resolve_relative_url` in shell > in C. This functionality is needed in C for introducing the groups > feature later on. When using groups, the user should not need to run > `git submodule init`, but it should be

Re: [PATCHv2] submodule: Port resolve_relative_url from shell to C

2015-12-17 Thread Johannes Sixt
Am 17.12.2015 um 19:55 schrieb Johannes Sixt: As to the implementation, find a patch below that removes the ifdefs and a few other suggestions. The word "offers" is missing in this last half-sentence ;) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message

Re: [PATCHv2] submodule: Port resolve_relative_url from shell to C

2015-12-17 Thread Jeff King
On Thu, Dec 17, 2015 at 07:55:43PM +0100, Johannes Sixt wrote: > -static int has_same_dir_prefix(const char *str, const char **out) > +static int starts_with_dot_slash(const char *str) > { > -#ifdef GIT_WINDOWS_NATIVE > - return skip_prefix(str, "./", out) > - || skip_prefix(str,

[PATCHv2] submodule: Port resolve_relative_url from shell to C

2015-12-16 Thread Stefan Beller
This reimplements the helper function `resolve_relative_url` in shell in C. This functionality is needed in C for introducing the groups feature later on. When using groups, the user should not need to run `git submodule init`, but it should be implicit at all appropriate places, which are all in