Web lists-archives.com

Re: Enhancement request: git-push: Allow (configurable) default push-option

On Wed, Oct 11, 2017 at 2:18 AM, Marius Paliga <marius.paliga@xxxxxxxxx> wrote:
> Found one possible issue when looking for duplicates, we need to use
>   "unsorted_string_list_has_string" instead of "string_list_has_string"
> -                       if (!string_list_has_string(&push_options,
> item->string))
> +                       if
> (!unsorted_string_list_has_string(&push_options, item->string)) {
> New (fixed) patch follows...
> Signed-off-by: Marius Paliga <marius.paliga@xxxxxxxxx>

Yay, thanks for working on this!

Junio gave good advice to the patch itself (the code), another thing
is the commit message, which follows the formalities with the sign off,
but the content is not addressing the target audience.

The current commit message is written as an improvement compared
to the previous patch and for readers who are reviewing the patch
right now.

Commit messages are read by people later in time, also they do not
care about the different iterations of the patch, as only the final iteration

I think for the commit message you can borrow from the very first email
you sent to the list, maybe something like:

    builtin/push.c: add push.pushOption config

    Currently push options need to be given explicitly, via
    the command line as "git push --push-option".

    Some code review systems [which?] need specific push options
    nearly all the time, so the UX of Git would be enhanced if push
    options could be configured instead of given each time on the\
    command line.

    Add the config option push.pushOption, which is a multi
    string option, containing push options that are sent by default.

    When push options are set in the system wide config
    (/etc/gitconfig), they can be unset(?) later in the more specific
    repository config by setting the string to the empty string.

    Add tests and documentation as well.

    Signed-off-by ...