[PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-04-15 Thread Stefan Beller
Later on we want to automatically call `git submodule init` from other commands, such that the users don't have to initialize the submodule themselves. As these other commands are written in C already, we'd need the init functionality in C, too. The `resolve_relative_url` function is a large part

Re: [PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-04-14 Thread Stefan Beller
On Thu, Apr 14, 2016 at 12:35 PM, Johannes Sixt wrote: > Am 14.04.2016 um 20:18 schrieb Stefan Beller: >> @@ -298,4 +305,40 @@ test_git_path GIT_COMMON_DIR=bar config >> bar/config >> test_git_path GIT_COMMON_DIR=bar packed-refs bar/packed-refs >> test_git_path

Re: [PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-04-14 Thread Johannes Sixt
Am 14.04.2016 um 20:18 schrieb Stefan Beller: > @@ -298,4 +305,40 @@ test_git_path GIT_COMMON_DIR=bar config > bar/config > test_git_path GIT_COMMON_DIR=bar packed-refs bar/packed-refs > test_git_path GIT_COMMON_DIR=bar shallow bar/shallow > >

[PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-04-14 Thread Stefan Beller
Later on we want to automatically call `git submodule init` from other commands, such that the users don't have to initialize the submodule themselves. As these other commands are written in C already, we'd need the init functionality in C, too. The `resolve_relative_url` function is a large part

[PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-04-12 Thread Stefan Beller
Later on we want to automatically call `git submodule init` from other commands, such that the users don't have to initialize the submodule themselves. As these other commands are written in C already, we'd need the init functionality in C, too. The `resolve_relative_url` function is a large part

[PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-03-14 Thread Stefan Beller
Later on we want to automatically call `git submodule init` from other commands, such that the users don't have to initialize the submodule themselves. As these other commands are written in C already, we'd need the init functionality in C, too. The `resolve_relative_url` function is a large part

Re: [PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-03-02 Thread Stefan Beller
On Wed, Mar 2, 2016 at 9:21 AM, Johannes Sixt wrote: > Am 13.02.2016 um 00:39 schrieb Stefan Beller: >> @@ -289,4 +296,39 @@ test_git_path GIT_COMMON_DIR=bar config >> bar/config >> test_git_path GIT_COMMON_DIR=bar packed-refs bar/packed-refs >> test_git_path GI

Re: [PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-03-02 Thread Johannes Sixt
Am 13.02.2016 um 00:39 schrieb Stefan Beller: > @@ -289,4 +296,39 @@ test_git_path GIT_COMMON_DIR=bar config > bar/config > test_git_path GIT_COMMON_DIR=bar packed-refs bar/packed-refs > test_git_path GIT_COMMON_DIR=bar shallow bar/shallow > >

Re: [PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-02-27 Thread Duy Nguyen
On Fri, Feb 12, 2016 at 03:39:15PM -0800, Stefan Beller wrote: > Later on we want to automatically call `git submodule init` from > other commands, such that the users don't have to initialize the > submodule themselves. As these other commands are written in C > already, we'd need the init functi

Re: [PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-02-18 Thread Junio C Hamano
Stefan Beller writes: > +static int starts_with_dot_slash(const char *str) > +{ > + return str[0] == '.' && is_dir_sep(str[1]); > +} > + > +static int starts_with_dot_dot_slash(const char *str) > +{ > + return str[0] == '.' && str[1] == '.' && is_dir_sep(str[2]); > +} > + > +/* > + * Retu

[PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-02-12 Thread Stefan Beller
Later on we want to automatically call `git submodule init` from other commands, such that the users don't have to initialize the submodule themselves. As these other commands are written in C already, we'd need the init functionality in C, too. The `resolve_relative_url` function is a large part