Re: [PATCH 3/2] push: allow --follow-tags to be set by config push.followTags

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

 



On Sun, Feb 15, 2015 at 10:02 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> On Sun, Feb 15, 2015 at 9:54 PM, Jeff King <peff@xxxxxxxx> wrote:
>>
>> Or alternatively, we could pull the "flags" field from cmd_push out into
>> a static global "transport_flags", and manipulate it directly from the
>> config (or if we don't like a global, pass it via the config-callback
>> void pointer; but certainly a global is more common in git for code like
>> this). Then we do not have to worry about propagating values from
>> integers into flag bits at all.
>
> Yup, that would be my preference. The largest problem I had with the
> original change was how to ensure that future new code would not
> mistakenly set the global follow_tags _without_ letting the command
> line option parser to override it. If the config parser flips the bit in the
> same flags, it would become much less likely for future code to make
> such a mistake.

Having said that, I think this version is good enough.

Unlike a global in environment.c (that is named not-so-specifically that
anybody can set by reading the configuration file) that can be overriden
only by command line parser used only for "git push", the global int and
the flags are both localized to "git push" in this version, and there is
much less chance to introduce new buggy code that forgets the command
line override.

Thanks, again.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]