1
0
mirror of https://github.com/git/git.git synced 2025-04-03 16:31:13 +00:00
git/builtin
Jeff King 00a6fa0720 push: truly use "simple" as default, not "upstream"
The plan for the push.default transition had all along been
to use the "simple" method rather than "upstream" as a
default if the user did not specify their own push.default
value. Commit 11037ee (push: switch default from "matching"
to "simple", 2013-01-04) tried to implement that by moving
PUSH_DEFAULT_UNSPECIFIED in our switch statement to
fall-through to the PUSH_DEFAULT_SIMPLE case.

When the commit that became 11037ee was originally written,
that would have been enough. We would fall through to
calling setup_push_upstream() with the "simple" parameter
set to 1. However, it was delayed for a while until we were
ready to make the transition in Git 2.0.

And in the meantime, commit ed2b182 (push: change `simple`
to accommodate triangular workflows, 2013-06-19) threw a
monkey wrench into the works. That commit drops the "simple"
parameter to setup_push_upstream, and instead checks whether
the global "push_default" is PUSH_DEFAULT_SIMPLE. This is
right when the user has explicitly configured push.default
to simple, but wrong when we are a fall-through for the
"unspecified" case.

We never noticed because our push.default tests do not cover
the case of the variable being totally unset; they only
check the "simple" behavior itself.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-30 18:11:25 -08:00
..
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-03-14 14:25:31 -07:00
2014-01-17 12:21:20 -08:00
2014-02-27 14:01:30 -08:00
2014-04-03 12:38:47 -07:00
2014-03-31 15:29:27 -07:00
2014-03-25 11:02:02 -07:00
2014-04-08 12:00:33 -07:00
2013-12-17 12:02:44 -08:00
2013-07-15 10:56:07 -07:00
2014-03-14 14:25:03 -07:00
2014-02-27 14:01:48 -08:00
2014-01-17 12:21:20 -08:00