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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marius Paliga <marius.paliga@xxxxxxxxx> writes:

> Thank you for your coments and explanation.
>
> Just one thing:
>
>>  - After parse_options() returns to cmd_push(), see if push_options
>>    is empty.  If it is, you did not get any command line option, so
>>    override it with what you collected in the "from-config" string
>>    list.  Otherwise, do not even look at "from-config" string list.
>
> The idea is that there are default push options (read from config) that are
> always sent to the server and you can add (not overwrite) additional by
> specifying "--push-option".

I can imagine that sometimes giving a base from a configuration and
then adding more for specific invocation may be useful.  

But I do not think of any --command-line-option and config.variable
pair whose configured value cannot be overriden by the command line
option; we should strive to avoid making --push-option a special
case that the users need to aware of, and more importantly, users
other than you who expect the more usual "command line overrides"
behaviour should get that.

Your "I wanted to accumulate, so I made so and made it impossible to
override" won't fly as a justification.  The default should be
"command line overrides", and if you need a way to allow command
line to add without overiding, that should be added as an optional
feature.

	[alias]
		mypush = push --push-option=foo --push-option=bar

may give you a set of push-options that are always in effect (they
are not even "by default") and cannot be overriden.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux