Re: [PATCH 2/2] builtin/push.c: make push_default a static variable
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 16, 2015, 05:57 UTC
- Message-ID
- <CAPc5daXU6x2ok+XqXDkWWi5O2N_dr+deQtOMx+Eh16UUGi5yJQ@mail.gmail.com>
- In-Reply-To
- <20150216054754.GB25088@peff.net>
On Sun, Feb 15, 2015 at 9:47 PM, Jeff King <peff@peff.net> wrote:
Show 13 quoted lines
> When the "push_default" flag was originally added, it was > made globally visible to all code. This might have been > useful if other commands or library calls ended up depending > on it, but as it turns out, only builtin/push.c cares. > ... > Signed-off-by: Jeff King <peff@peff.net> > --- > We know this is safe because no other callers needed tweaked when the > variable went out of scope. :) It would only be a bad idea if we > were planning on having other code in the future depend on push_default > (e.g., the code in remote.c to find the push destination). But it does > not seem to have needed that in the intervening years, so it's probably > fine to do this cleanup now.
Yay. Great minds think alike ;-)
"It definitely smells wrong to touch environment.c and cache.h" was my first reaction to the "follow-tags config" patch, and I really think this shows the right way forward.
Thanks.