On Tue, Nov 1, 2016 at 10:31 AM, Stefan Beller wrote:
> On Tue, Nov 1, 2016 at 10:20 AM, Junio C Hamano wrote:
>
>>
>> Maybe I am old fashioned, but I'd feel better to see these with
>> explicit "extern" in front (check the older header files like
>>
On 10/31/2016 03:38 PM, Brandon Williams wrote:
+ struct strbuf buf = STRBUF_INIT;
+ char *submodule_url = NULL;
+
+ strbuf_addf(, "submodule.%s.url", module->name);
+ ret = !git_config_get_string(buf.buf, _url);
+
+
On Tue, Nov 1, 2016 at 10:20 AM, Junio C Hamano wrote:
>
> Maybe I am old fashioned, but I'd feel better to see these with
> explicit "extern" in front (check the older header files like
> cache.h when you are in doubt what the project convention has been).
I did check the
On 11/01, Junio C Hamano wrote:
> Stefan Beller writes:
>
> Overall the suggestions from you in this review is good and please
> consider anything I did not mention I agree with you. Thanks.
>
> >> +extern int is_submodule_initialized(const char *path);
> >> +extern int
On 10/31, Stefan Beller wrote:
> On Mon, Oct 31, 2016 at 3:38 PM, Brandon Williams wrote:
> > +int is_submodule_checked_out(const char *path)
> > +{
> > + int ret = 0;
> > + struct strbuf buf = STRBUF_INIT;
> > +
> > + strbuf_addf(, "%s/.git", path);
> > +
Stefan Beller writes:
Overall the suggestions from you in this review is good and please
consider anything I did not mention I agree with you. Thanks.
>> +extern int is_submodule_initialized(const char *path);
>> +extern int is_submodule_checked_out(const char *path);
>
>
On Mon, Oct 31, 2016 at 3:38 PM, Brandon Williams wrote:
> +int is_submodule_checked_out(const char *path)
> +{
> + int ret = 0;
> + struct strbuf buf = STRBUF_INIT;
> +
> + strbuf_addf(, "%s/.git", path);
> + ret = file_exists(buf.buf);
I think we can
Add two helper functions to submodules.c.
`is_submodule_initialized()` checks if a submodule has been initialized
at a given path and `is_submodule_checked_out()` check if a submodule
has been checked out at a given path.
Signed-off-by: Brandon Williams
---
submodule.c | 39
8 matches
Mail list logo