Thread (15 messages) 15 messages, 3 authors, 2016-06-15

Re: [PATCH 2/2] builtin/push.c: make push_default a static variable

flat view

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:03:49

On Sun, Feb 15, 2015 at 9:47 PM, Jeff King [off-list ref] wrote:
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 <redacted>
---
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help