Re: [PATCH v10 4/8] receive-pack: new config receive.procReceiveRefs
- From
Jiang Xin <worldhello.net@gmail.com>
- Date
- Apr 13, 2020, 11:16 UTC
- Message-ID
- <CANYiYbGDxA62wUhaAZYzzHnhjkTppQjPL-Q=xQZtJ6Rdj0fbEg@mail.gmail.com>
- In-Reply-To
- <xmqqwo6kcr83.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> 于2020年4月13日周一 上午5:46写道:
Show 17 quoted lines
>
> Jiang Xin <worldhello.net@gmail.com> writes:
>
> > + if (strcmp(var, "receive.procreceiverefs") == 0) {
> > + char *prefix;
> > + int len;
> > +
> > + if (!value)
> > + return config_error_nonbool(var);
> > + prefix = xstrdup(value);
> > + len = strlen(prefix);
> > + while (len && prefix[len - 1] == '/')
> > + prefix[--len] = '\0';
> > + string_list_insert(&proc_receive_refs, prefix);
>
> This smells like a copy of the hidden-refs configuration parsing,
> which uses string_list_append(), and its result is used for look-upSo this means I copied it from elsewhere ;-) Will replace it from string_list_insert() to string_list_append().