Re: [PATCH 2/2] builtin/push.c: make push_default a static variable
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 18, 2015, 19:08 UTC
- Message-ID
- <xmqqh9uj2g25.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150218185007.GA7257@peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
>> + if (!strcmp(k, "push.followtags")) {
>> + if (git_config_bool(k, v))
>> + *flags |= TRANSPORT_PUSH_FOLLOW_TAGS;
>> + else
>> + *flags &= ~TRANSPORT_PUSH_FOLLOW_TAGS;
>> + return 0;
>> + }
>
> Did you have an opinion on sticking this behind a helper function?Not very strongly either way. Seeing the above does not bother me too much, but I do not know how I would feel when I start seeing
val = git_config_book(k, v); flip_bool(val, &flags, TRANSPORT_PUSH_FOLLOW_TAGS);
often. Not having to make sure that the bit constant whose name tends to get long is not misspelled is certainly a plus.