Re: [PATCH 2/8] tag: Refactor the options handling code to be less bizarro
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 18, 2017, 19:27 UTC
- Message-ID
- <xmqqo9wy1j3s.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACBZZX4Zs=00QXv5eaafQd8-n7OakcL3WeQh8XxiMo-9a+kAzQ@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> But I thought it was very a very bizarre pattern to set us to cmdmode > = 'l' when we're not in that mode at all just to, as can be seen in > the diff, get around a slightly more verbose one-time if-check.
When I wrote my response, I viewed that setting as committing to be in the "list" mode, not as a workaround. So checking with !cmdmode to make sure that the command line is not asking to create a tag makes tons of sense; the new test makes it unreadable from that point of view.