On Thu, Dec 26, 2013 at 11:27:10AM -0800, Junio C Hamano wrote:
> > I still need consensus on the name here guys, parse_prefix.
> > remove_prefix or strip_prefix? If no other opinions i'll go with
> > strip_prefix (Jeff's comment before parse_prefix() also uses "strip")
>
> Yup, that comment is w
Duy Nguyen writes:
> On Sat, Dec 21, 2013 at 4:31 AM, Junio C Hamano wrote:
>> Jeff King writes:
>>
>>> /* here we care if we saw the prefix, as above */
>>> if (parse_prefix(foo, prefix, &the_rest))
>>> ...
>>>
>>> /*
>>>* and here we do not care, and just want to optionally st
On Sat, Dec 21, 2013 at 4:31 AM, Junio C Hamano wrote:
> Jeff King writes:
>
>> /* here we care if we saw the prefix, as above */
>> if (parse_prefix(foo, prefix, &the_rest))
>> ...
>>
>> /*
>>* and here we do not care, and just want to optionally strip the
>>* prefix, and tak
Jeff King writes:
> /* here we care if we saw the prefix, as above */
> if (parse_prefix(foo, prefix, &the_rest))
> ...
>
> /*
>* and here we do not care, and just want to optionally strip the
>* prefix, and take the full value otherwise; we just have to ignore
>* the retu
Am 20.12.2013 08:04, schrieb Jeff King:
> On Fri, Dec 20, 2013 at 07:51:00AM +0100, Johannes Sixt wrote:
>
>>> for (i = 1; i < argc && *argv[i] == '-'; i++) {
>>> const char *arg = argv[i];
>>> + const char *optarg;
>>>
>>> - if (starts_with(arg, "--upload-pa
On Fri, Dec 20, 2013 at 8:04 AM, Jeff King wrote:
> On Fri, Dec 20, 2013 at 07:51:00AM +0100, Johannes Sixt wrote:
>
>> > for (i = 1; i < argc && *argv[i] == '-'; i++) {
>> > const char *arg = argv[i];
>> > + const char *optarg;
>> >
>> > - if (starts_with(arg,
On Fri, Dec 20, 2013 at 07:51:00AM +0100, Johannes Sixt wrote:
> > for (i = 1; i < argc && *argv[i] == '-'; i++) {
> > const char *arg = argv[i];
> > + const char *optarg;
> >
> > - if (starts_with(arg, "--upload-pack=")) {
> > - args.uploadp
Am 12/18/2013 15:53, schrieb Nguyễn Thái Ngọc Duy:
> The code that's not converted to use parse_options() often does
>
> if (!starts_with(arg, "foo=")) {
> value = atoi(arg + 4);
> }
>
> This patch removes those magic numbers with skip_prefix()
>
> Signed-off-by: Nguyễn Thái Ngọc Duy
>
The code that's not converted to use parse_options() often does
if (!starts_with(arg, "foo=")) {
value = atoi(arg + 4);
}
This patch removes those magic numbers with skip_prefix()
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/fetch-pack.c | 13 +
builtin/index-pack.c
9 matches
Mail list logo