> > Teach "clone" the same ability, except that because "clone" already
> > has "-o" for another parameter, teach "clone" only to receive
> > "--server-option".
> 
> Can you give an example of what this would be used for?  An example I
> can think of might be
> 
>       git clone --server-option=priority=batch <url>

protocol-v2.txt says that it is server-specific, so I don't think I can
give any meaningful examples here.

> > --- a/builtin/clone.c
> > +++ b/builtin/clone.c
> > @@ -66,6 +66,7 @@ static int option_dissociate;
> >  static int max_jobs = -1;
> >  static struct string_list option_recurse_submodules = 
> > STRING_LIST_INIT_NODUP;
> >  static struct list_objects_filter_options filter_options;
> > +static struct string_list server_options = STRING_LIST_INIT_DUP;
> 
> The other string-list options in this file all use NODUP.  Is there a
> reason this one uses DUP instead?  (Just curious --- I suspect either
> would work fine, since nothing here does tricks with modifying argv
> entries after option parsing.)
> 
> The same question applies to the corresponding option in
> builtin/fetch.c, so while it is not likely to matter in practice, it
> would be nice for readability to find out.

I guess it could be either. It's true that I just copied it from
builtin/fetch.c. I'll change it to NODUP if a reroll is needed for
another reason.

> > +   OPT_STRING_LIST(0, "server-option", &server_options, 
> > N_("server-specific"),
> 
> nit: long line

I'll change this if a reroll is needed for another reason.

> Reviewed-by: Jonathan Nieder <jrnie...@gmail.com>
> 
> Thanks for a pleasant read.

Thanks for your review.

Reply via email to