Eric Sunshine writes:
>> char *resolve_refdup(const char *ref, unsigned char *sha1, int reading, int
>> *flag)
>> {
>> - const char *ret = resolve_ref_unsafe(ref, sha1, reading, flag);
>> - return ret ? xstrdup(ret) : NULL;
>> + struct strbuf buf = STRBUF_INIT;
>> + if
On Fri, Jul 25, 2014 at 6:43 AM, Nguyễn Thái Ngọc Duy wrote:
> In the beginning, we had resolve_ref() that returns a buffer owned by
> this function. Then we started to move away from that direction because
> the buffer could be overwritten by the next resolve_ref() call and
> introduced two new f
In the beginning, we had resolve_ref() that returns a buffer owned by
this function. Then we started to move away from that direction because
the buffer could be overwritten by the next resolve_ref() call and
introduced two new functions: resolve_ref_unsafe() and resolve_refdup().
The static buffer
3 matches
Mail list logo