Re: [PATCH v3 14/35] connect: request remote refs using v2
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 27, 2018, 23:32 UTC
- Message-ID
- <xmqq606inh4b.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180227221808.GE11187@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 18 quoted lines
>> struct strs {...};
>>
>> void strs_init(struct strs *);
>> void strs_push(struct strs *, const char *);
>> void strs_pushf(struct strs *, const char *fmt, ...);
>> void strs_pushl(struct strs *, ...);
>> void strs_pushv(struct strs *, const char **);
>> void strs_pop(struct strs *);
>> void strs_clear(struct strs *);
>> const char **strs_detach(struct strs *);
>>
>> ...is short, feels pretty natural, and doesn't require understanding
>> "v" for "vector".
>
> Not bad. The "v" carries the information that it _is_ a NULL-terminated
> vector and not some other list-like structure (and so is suitable for
> feeding to execv, etc). But that may just be obvious from looking at its
> uses and documentation.And with "v", it probably is obvious without looking at its uses and documentation, so... ;-)