Re: [PATCH v5 2/3] pull: move default warning
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Dec 12, 2020, 16:42 UTC
- Message-ID
- <5fd4f2f03f28e_bc1eb20890@natae.notmuch>
- In-Reply-To
- <CAMP44s170qZuZqmh_gVLGgJJ5005HzDM0fdQKQamjHkZCOu7_Q@mail.gmail.com>
Felipe Contreras wrote:
> On Fri, Dec 11, 2020 at 12:54 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> > - by introducing a local variable in cmd_pull() and passing a > > pointer to it to config_get_rebase(), we can easily avoid having > > to rely on an extra global variable. > > > > I'd suggest addressing the above along the following lines. > > ... > > > to possibly cause it to set to true, and use that instead of the > > global variable to decide if we want to give the help text. > > Yeah, there's only 38 global variables. We wouldn't want another one > which makes the code pretty straightforward.
Another thing that I mentioned in another version of the patch series but not on this one (since the relevant patch was removed) is that this variable is only needed temporarily; it can be removed by further code reorganization.
So, I don't think it makes sense to change more code than necessary for the sake of this variable (that might very well disappear).
-- Felipe Contreras