Re: [PATCH 7/7] Add a config option push.gpgSign for default signed pushes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 17, 2015, 19:42 UTC
- Message-ID
- <xmqqk2std7lt.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAD0k6qTnJPc+Nh6dck0_Zx9vnyn5YVMCmy3E=7vr8bTpRSppAA@mail.gmail.com>
Dave Borowitz <dborowitz@google.com> writes:
Show 7 quoted lines
> The issue is that if both _ALWAYS and _IF_POSSIBLE are set, > git_transport_push interprets it as _ALWAYS. But, we are also supposed > to prefer explicit command-line options to config values. > > Suppose we parsed config first, then options. If the user has > push.signed = always and and passes --signed-if-possible, then the end > result is (_ALWAYS | _IF_POSSIBLE), aka always,...
Doesn't that merely suggest that the option parsing is implemented incorrectly? Why is --signed-if-possible just ORing its bits into the flag, instead of clearing and setting?