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

Re: git push (mis ?)behavior

From: Karl Hasselström <hidden>
Date: 2016-06-15 22:43:38

On 2007-10-03 04:08:09 -0700, Junio C Hamano wrote:
Karl Hasselström [off-list ref] writes:
quoted
So it all comes down to case (2) mistakes being much harder to fix
than case (1) mistakes. Therefore, we should change the default,
since doing so makes it safer.
I am not convinced.

I've seen many new people alias "rm" to "rm -i" for this (I'd say
"false") reasoning to "default to safer", and end up training their
fingers to say "y" without thinking.
I don't think that's a good analogy here, since no one is proposing
any kind of interactive prompt.
Also mistakes can cut both ways. Pushing out what you did not intend
to is what you seem to be worried about more. But not pushing out
enough and not noticing is an equally bad mistake.
It may be an equally bad mistake, but it's _not_ equally hard to fix.
(And in my book, that means they aren't in fact equally bad.)

You're right that some users will train their fingers to always type
"git push --all" to the point where they will push everything by
mistake even in cases where that's not what they wanted. But the same
thing will happen with the current default for people who almost
always push just a single branch, and train their fingers for that.
And you just said the two mistakes were equally bad. :-)
People also argue for "default per user". I am not really convinced
on that point either.

You, an expert, will get asked for help by somebody, walk up to his
shell prompt, and try to help and teach him by showing you type, and
then you suddenly notice the command does not work as you expect
because he set the default differently (because he read that
configuration option on some web parge). And we will be in such a
cumbersome to diagnose situation _very_ often if we have per-user
default on many things.
I'm generally opposed to per-user settings for that reason. Users who
insist can alias "pusha" to "push --all".

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help