On Mon, Aug 15, 2016 at 1:36 PM, Junio C Hamano wrote:
>
>>> Why do you need "err_buf", instead of directly writing the error to
>>> "err", especially if "err" is not optional?
>>>
+ ...
+out:
+ if (err_buf.len) {
>>
>> If we were directly writing to err, we would have checked
>
Stefan Beller writes:
> On Fri, Aug 12, 2016 at 3:25 PM, Junio C Hamano wrote:
>> Stefan Beller writes:
>>
>>> + struct strbuf sb = STRBUF_INIT;
>>> + char *ref_git = compute_alternate_path(item->string, &sb);
>>
>> Who owns the memory for ref_git?
>
> The caller of compute_alternate_pa
On Fri, Aug 12, 2016 at 3:25 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> + struct strbuf sb = STRBUF_INIT;
>> + char *ref_git = compute_alternate_path(item->string, &sb);
>
> Who owns the memory for ref_git?
The caller of compute_alternate_path(..), which makes
add_one_referen
Stefan Beller writes:
> + struct strbuf sb = STRBUF_INIT;
> + char *ref_git = compute_alternate_path(item->string, &sb);
Who owns the memory for ref_git?
> - if (!access(mkpath("%s/shallow", ref_git), F_OK))
> - die(_("reference repository '%s' is shallow"), item->string
In a later patch we want to determine if a path is suitable as an
alternate from other commands than builtin/clone. Move the checking
functionality of `add_one_reference` to `compute_alternate_path` that is
defined in cache.h.
Signed-off-by: Stefan Beller
---
builtin/clone.c | 42 ++-
5 matches
Mail list logo