Junio C Hamano <gitster@xxxxxxxxx> 于2020年4月13日周一 上午5:46写道: > > Jiang Xin <worldhello.net@xxxxxxxxx> 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-up So this means I copied it from elsewhere ;-) Will replace it from string_list_insert() to string_list_append().