Re: [PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-24 Thread Stefan Beller
On Fri, Apr 21, 2017 at 10:27 PM, Michael Haggerty wrote: > On 04/19/2017 01:01 PM, Nguyễn Thái Ngọc Duy wrote: >> This is a better place that will benefit all submodule callers instead >> of just resolve_gitlink_ref() >> >> Signed-off-by: Nguyễn Thái Ngọc Duy

Re: [PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-21 Thread Michael Haggerty
On 04/19/2017 01:01 PM, Nguyễn Thái Ngọc Duy wrote: > This is a better place that will benefit all submodule callers instead > of just resolve_gitlink_ref() > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > refs.c | 33 + > 1 file changed, 17

Re: [PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-20 Thread Johannes Sixt
Am 20.04.2017 um 13:56 schrieb Duy Nguyen: On Thu, Apr 20, 2017 at 5:02 AM, Johannes Sixt wrote: What is the source of the value of 'submodule'? Is it an index entry? Or did it pass through parse_pathspec? In these cases it is correct to compare against literal '/'. Otherwise,

Re: [PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-20 Thread Duy Nguyen
On Thu, Apr 20, 2017 at 5:02 AM, Johannes Sixt wrote: > Am 19.04.2017 um 13:01 schrieb Nguyễn Thái Ngọc Duy: >> >> @@ -1558,7 +1543,17 @@ struct ref_store *get_submodule_ref_store(const >> char *submodule) >> { >> struct strbuf submodule_sb = STRBUF_INIT; >> struct

Re: [PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-19 Thread Duy Nguyen
On Thu, Apr 20, 2017 at 12:02:08AM +0200, Johannes Sixt wrote: > Am 19.04.2017 um 13:01 schrieb Nguyễn Thái Ngọc Duy: > > @@ -1558,7 +1543,17 @@ struct ref_store *get_submodule_ref_store(const char > > *submodule) > > { > > struct strbuf submodule_sb = STRBUF_INIT; > > struct ref_store

Re: [PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-19 Thread Johannes Sixt
Am 19.04.2017 um 13:01 schrieb Nguyễn Thái Ngọc Duy: @@ -1558,7 +1543,17 @@ struct ref_store *get_submodule_ref_store(const char *submodule) { struct strbuf submodule_sb = STRBUF_INIT; struct ref_store *refs; + char *to_free = NULL; int ret; + size_t len; +