* [PATCH] push: shorten "push.default is unset" warning message
@ 2016-02-23 14:59 Matthieu Moy
2016-02-23 19:05 ` Junio C Hamano
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Matthieu Moy @ 2016-02-23 14:59 UTC (permalink / raw)
To: git
From: Matthieu Moy <matthieu.moy@imag.fr>
The warning was purposely long, both to explain the situation properly
and to give a strong incentive to set push.default explicitly. This was
important before the 2.0 transition, and remained important for a while
after, so that new users get push.default explicitly in their
configuration and do not experience inconsistent behavior if they ever
used an older version of Git.
The warning has been there since version 1.8.0 (Oct 2012), hence we can
expect the vast majority of current Git users to have been exposed to
it, and most of them have already set push.default explicitly. The
switch from 'matching' to 'simple' was planned for 2.0 (May 2014), but
actually happened only for 2.3 (Feb 2015).
The warning is mostly seen by beginners, who have not set their
push.default configuration (yet). For many of them, the warning is
confusing because it talks about concepts that they have not learned and
asks them a choice that they are not able to make yet. See for example
http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0
(1260 votes for the question, 1824 for the answer as of writing)
Shorten the warning and mention only the way to remove the warning
without changing the behavior. Keep a pointer to the documentation so
that people willing to learn can still find the alternative behaviors
easily.
Eventually, the warning should be removed completely, but this can wait
a couple more releases or years.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
builtin/push.c | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/builtin/push.c b/builtin/push.c
index 960ffc3..00eba2f 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -205,26 +205,12 @@ static void setup_push_current(struct remote *remote, struct branch *branch)
}
static char warn_unspecified_push_default_msg[] =
-N_("push.default is unset; its implicit value has changed in\n"
- "Git 2.0 from 'matching' to 'simple'. To squelch this message\n"
- "and maintain the traditional behavior, use:\n"
- "\n"
- " git config --global push.default matching\n"
- "\n"
- "To squelch this message and adopt the new behavior now, use:\n"
+N_("push.default is unset; its default value has changed in Git 2.0 from\n"
+ "'matching' to 'simple'. To squelch this message and adopt the new behavior, use:\n"
"\n"
" git config --global push.default simple\n"
"\n"
- "When push.default is set to 'matching', git will push local branches\n"
- "to the remote branches that already exist with the same name.\n"
- "\n"
- "Since Git 2.0, Git defaults to the more conservative 'simple'\n"
- "behavior, which only pushes the current branch to the corresponding\n"
- "remote branch that 'git pull' uses to update the current branch.\n"
- "\n"
- "See 'git help config' and search for 'push.default' for further information.\n"
- "(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\n"
- "'current' instead of 'simple' if you sometimes use older versions of Git)");
+ "See 'git help config' and search for 'push.default' for further information.");
static void warn_unspecified_push_default_configuration(void)
{
--
https://github.com/git/git/pull/201
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] push: shorten "push.default is unset" warning message
2016-02-23 14:59 [PATCH] push: shorten "push.default is unset" warning message Matthieu Moy
@ 2016-02-23 19:05 ` Junio C Hamano
2016-02-23 19:47 ` Matthieu Moy
2016-02-24 10:11 ` Jeff King
2016-02-23 20:38 ` Philip Oakley
2016-02-25 9:21 ` [PATCH v2 0/2] Remove "push.default unset" warning Matthieu Moy
2 siblings, 2 replies; 11+ messages in thread
From: Junio C Hamano @ 2016-02-23 19:05 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> The warning is mostly seen by beginners, who have not set their
> push.default configuration (yet). For many of them, the warning is
> confusing because it talks about concepts that they have not learned and
> asks them a choice that they are not able to make yet. See for example
>
> http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0
>
> (1260 votes for the question, 1824 for the answer as of writing)
The punchline of that question is:
I can obviously set it to one of the values mentioned, but what do
they mean? What's the difference between simple and matching?
It tells us that "See 'git help config'" is not such an effective
message to help such a user.
> Shorten the warning and mention only the way to remove the warning
> without changing the behavior. Keep a pointer to the documentation so
> that people willing to learn can still find the alternative behaviors
> easily.
While I admit that I usually am the most cautious one when dealing
with any change, I am not sure if this rephrasing helps very much.
As we saw, the sentence you kept, "See 'git help config'", is not
effective in helping those stackoverflow users. Removal of the
other parts of the message the patch does does make sense, as we
know these users do not read, so they are merely noisy black pixels
on the screen.
If most people are happy with "simple" (and certainly that was the
assumption and hope behind the transtion we made at 2.0), we may be
better off removing the warning altogether. Keeping "and adopt the
new behaviour" part pretends to be offering a chance to make an
informed choice, but it will forever be unclear to the non-reader
what the implication of not adopting the new behaviour is anyway, so
overall we won't see reduced hits at stackoverflow with this change.
After all, push.default configuration is hardly the only case where
there are other ways to use Git that may match the user's situation
better, and we do not advertise "Oh by the way you can do things
differently, study the manual" for any of them with a warning
message like this. Those who want to do different things know to
seek settings to tweak.
The above analysis considers _only_ those who go to stackoverflow.
For those who do read, perhaps "See 'git config help'" may have some
value, but again, many aspects of the system can be tweaked, and we
do not advertise that everywhere, so...
> Eventually, the warning should be removed completely, but this can wait
> a couple more releases or years.
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
> ---
> builtin/push.c | 20 +++-----------------
> 1 file changed, 3 insertions(+), 17 deletions(-)
>
> diff --git a/builtin/push.c b/builtin/push.c
> index 960ffc3..00eba2f 100644
> --- a/builtin/push.c
> +++ b/builtin/push.c
> @@ -205,26 +205,12 @@ static void setup_push_current(struct remote *remote, struct branch *branch)
> }
>
> static char warn_unspecified_push_default_msg[] =
> -N_("push.default is unset; its implicit value has changed in\n"
> - "Git 2.0 from 'matching' to 'simple'. To squelch this message\n"
> - "and maintain the traditional behavior, use:\n"
> - "\n"
> - " git config --global push.default matching\n"
> - "\n"
> - "To squelch this message and adopt the new behavior now, use:\n"
> +N_("push.default is unset; its default value has changed in Git 2.0 from\n"
> + "'matching' to 'simple'. To squelch this message and adopt the new behavior, use:\n"
> "\n"
> " git config --global push.default simple\n"
> "\n"
> - "When push.default is set to 'matching', git will push local branches\n"
> - "to the remote branches that already exist with the same name.\n"
> - "\n"
> - "Since Git 2.0, Git defaults to the more conservative 'simple'\n"
> - "behavior, which only pushes the current branch to the corresponding\n"
> - "remote branch that 'git pull' uses to update the current branch.\n"
> - "\n"
> - "See 'git help config' and search for 'push.default' for further information.\n"
> - "(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\n"
> - "'current' instead of 'simple' if you sometimes use older versions of Git)");
> + "See 'git help config' and search for 'push.default' for further information.");
>
> static void warn_unspecified_push_default_configuration(void)
> {
>
> --
> https://github.com/git/git/pull/201
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] push: shorten "push.default is unset" warning message
2016-02-23 19:05 ` Junio C Hamano
@ 2016-02-23 19:47 ` Matthieu Moy
2016-02-24 10:11 ` Jeff King
1 sibling, 0 replies; 11+ messages in thread
From: Matthieu Moy @ 2016-02-23 19:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> The punchline of that question is:
>
> I can obviously set it to one of the values mentioned, but what do
> they mean? What's the difference between simple and matching?
>
> It tells us that "See 'git help config'" is not such an effective
> message to help such a user.
[ The teacher inside me speaks ]
Don't underestimate the ability to ignore any pointer to the doc from
many users.
In many case, when a student comes to me scared about an error or
warning message, I just ask the student to read the message to me. If
it's in english, I sometimes have to add "so, what does this mean in
French", and in many cases it's sufficient.
>> Shorten the warning and mention only the way to remove the warning
>> without changing the behavior. Keep a pointer to the documentation so
>> that people willing to learn can still find the alternative behaviors
>> easily.
>
> While I admit that I usually am the most cautious one when dealing
> with any change, I am not sure if this rephrasing helps very much.
> As we saw, the sentence you kept, "See 'git help config'", is not
> effective in helping those stackoverflow users.
Right. But assuming someone who reads the complete message, I found that
keeping only the first lines without a pointer to the doc make the text
kind of mysterious:
warning: push.default is unset; its default value has changed in Git 2.0 from
'matching' to 'simple'. To squelch this message and adopt the new behavior, use:
git config --global push.default simple
Alone, this really looks like a magic formula like "I'm showing you this
warning just to bug you, but you can get rid of it with ...".
> If most people are happy with "simple" (and certainly that was the
> assumption and hope behind the transtion we made at 2.0), we may be
> better off removing the warning altogether.
To me, this is the plan. I have no strong objection in removing it
completely, but I think it makes sense to keep a lightweight one for a
while: if people use different machines with different Git versions
(especially if they ever use a version in the interval 2.0 to 2.3 which
claims to use simple but actually do not), then these people may
appreciate an incentive to set push.default.
OTOH, if they use different Git versions, they will eventually get the
message.
> After all, push.default configuration is hardly the only case where
> there are other ways to use Git that may match the user's situation
> better, and we do not advertise "Oh by the way you can do things
> differently, study the manual" for any of them with a warning
> message like this. Those who want to do different things know to
> seek settings to tweak.
I completely agree with this.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] push: shorten "push.default is unset" warning message
2016-02-23 14:59 [PATCH] push: shorten "push.default is unset" warning message Matthieu Moy
2016-02-23 19:05 ` Junio C Hamano
@ 2016-02-23 20:38 ` Philip Oakley
2016-02-23 21:03 ` Matthieu Moy
2016-02-25 9:21 ` [PATCH v2 0/2] Remove "push.default unset" warning Matthieu Moy
2 siblings, 1 reply; 11+ messages in thread
From: Philip Oakley @ 2016-02-23 20:38 UTC (permalink / raw)
To: Matthieu Moy, git
From: "Matthieu Moy" <Matthieu.Moy@imag.fr>
> From: Matthieu Moy <matthieu.moy@imag.fr>
>
> The warning was purposely long, both to explain the situation properly
> and to give a strong incentive to set push.default explicitly. This was
> important before the 2.0 transition, and remained important for a while
> after, so that new users get push.default explicitly in their
> configuration and do not experience inconsistent behavior if they ever
> used an older version of Git.
>
> The warning has been there since version 1.8.0 (Oct 2012), hence we can
> expect the vast majority of current Git users to have been exposed to
> it, and most of them have already set push.default explicitly. The
> switch from 'matching' to 'simple' was planned for 2.0 (May 2014), but
> actually happened only for 2.3 (Feb 2015).
>
> The warning is mostly seen by beginners, who have not set their
> push.default configuration (yet). For many of them, the warning is
> confusing because it talks about concepts that they have not learned and
> asks them a choice that they are not able to make yet. See for example
>
>
> http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0
>
Shouldn't this also update the 'push' man page to state what the new default
is. @gerry's comment to the top answer
http://stackoverflow.com/a/13148313/717355 highlights that the word 'simple'
is not even mentioned in the 'push' man page.
> (1260 votes for the question, 1824 for the answer as of writing)
>
> Shorten the warning and mention only the way to remove the warning
> without changing the behavior. Keep a pointer to the documentation so
> that people willing to learn can still find the alternative behaviors
> easily.
>
> Eventually, the warning should be removed completely, but this can wait
> a couple more releases or years.
>
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
> ---
> builtin/push.c | 20 +++-----------------
> 1 file changed, 3 insertions(+), 17 deletions(-)
>
> diff --git a/builtin/push.c b/builtin/push.c
> index 960ffc3..00eba2f 100644
> --- a/builtin/push.c
> +++ b/builtin/push.c
> @@ -205,26 +205,12 @@ static void setup_push_current(struct remote
> *remote, struct branch *branch)
> }
>
> static char warn_unspecified_push_default_msg[] =
> -N_("push.default is unset; its implicit value has changed in\n"
> - "Git 2.0 from 'matching' to 'simple'. To squelch this message\n"
> - "and maintain the traditional behavior, use:\n"
> - "\n"
> - " git config --global push.default matching\n"
> - "\n"
> - "To squelch this message and adopt the new behavior now, use:\n"
> +N_("push.default is unset; its default value has changed in Git 2.0
> from\n"
> + "'matching' to 'simple'. To squelch this message and adopt the new
> behavior, use:\n"
> "\n"
> " git config --global push.default simple\n"
> "\n"
> - "When push.default is set to 'matching', git will push local
> branches\n"
> - "to the remote branches that already exist with the same name.\n"
> - "\n"
> - "Since Git 2.0, Git defaults to the more conservative 'simple'\n"
> - "behavior, which only pushes the current branch to the
> corresponding\n"
> - "remote branch that 'git pull' uses to update the current branch.\n"
> - "\n"
> - "See 'git help config' and search for 'push.default' for further
> information.\n"
> - "(the 'simple' mode was introduced in Git 1.7.11. Use the similar
> mode\n"
> - "'current' instead of 'simple' if you sometimes use older versions of
> Git)");
> + "See 'git help config' and search for 'push.default' for further
> information.");
>
> static void warn_unspecified_push_default_configuration(void)
> {
>
> --
> https://github.com/git/git/pull/201
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] push: shorten "push.default is unset" warning message
2016-02-23 20:38 ` Philip Oakley
@ 2016-02-23 21:03 ` Matthieu Moy
2016-02-23 21:04 ` [PATCH] Documentation/git-push: document that 'simple' is the default Matthieu Moy
0 siblings, 1 reply; 11+ messages in thread
From: Matthieu Moy @ 2016-02-23 21:03 UTC (permalink / raw)
To: Philip Oakley; +Cc: git
"Philip Oakley" <philipoakley@iee.org> writes:
> Shouldn't this also update the 'push' man page to state what the new
> default is. @gerry's comment to the top answer
> http://stackoverflow.com/a/13148313/717355 highlights that the word
> 'simple' is not even mentioned in the 'push' man page.
This is more or less a different topic IMHO. If git-push(1) is not clear
enough, then it should be clarified regardless of this patch. But a
patch follows.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Documentation/git-push: document that 'simple' is the default
2016-02-23 21:03 ` Matthieu Moy
@ 2016-02-23 21:04 ` Matthieu Moy
0 siblings, 0 replies; 11+ messages in thread
From: Matthieu Moy @ 2016-02-23 21:04 UTC (permalink / raw)
To: git; +Cc: philipoakley, Matthieu Moy
The default behavior is well documented already in git-config(1), but
git-push(1) itself did not mention it at all. For users willing to learn
how "git push" works but not how to configure it, this makes the
documentation cumbersome to read.
Make the git-push(1) page self-contained by adding a short summary of
what 'push.default=simple' does, early in the page.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Documentation/git-push.txt | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 32482ce..a992793 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -37,6 +37,13 @@ the default `<refspec>` by consulting `remote.*.push` configuration,
and if it is not found, honors `push.default` configuration to decide
what to push (See linkgit:git-config[1] for the meaning of `push.default`).
+When neither the command-line nor the configuration specify what to
+push, the default behavior is used, which corresponds to the `simple`
+value for `push.default`: the current branch is pushed to the
+corresponding upstream branch, but as a safety measure, the push is
+aborted if the upstream branch does not have the same name as the
+local one.
+
OPTIONS[[OPTIONS]]
------------------
--
2.7.2.334.g35ed2ae.dirty
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] push: shorten "push.default is unset" warning message
2016-02-23 19:05 ` Junio C Hamano
2016-02-23 19:47 ` Matthieu Moy
@ 2016-02-24 10:11 ` Jeff King
1 sibling, 0 replies; 11+ messages in thread
From: Jeff King @ 2016-02-24 10:11 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Matthieu Moy, git
On Tue, Feb 23, 2016 at 11:05:08AM -0800, Junio C Hamano wrote:
> If most people are happy with "simple" (and certainly that was the
> assumption and hope behind the transtion we made at 2.0), we may be
> better off removing the warning altogether. Keeping "and adopt the
> new behaviour" part pretends to be offering a chance to make an
> informed choice, but it will forever be unclear to the non-reader
> what the implication of not adopting the new behaviour is anyway, so
> overall we won't see reduced hits at stackoverflow with this change.
Yeah, this was my first thought on seeing Matthieu's patch. We inserted
that message to tell people about the impending change, and to catch any
stragglers even after the change had happened. At some point it simply
becomes obsolete history.
I dunno if that time is now or not. v2.3.0 (which actually flipped the
switch) is only a year old, but we've been showing the message since
v1.8.0, which is over 3 years old. Even Debian stable is way beyond
that. :)
So my inclination is to just rip out the warning entirely.
-Peff
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 0/2] Remove "push.default unset" warning
2016-02-23 14:59 [PATCH] push: shorten "push.default is unset" warning message Matthieu Moy
2016-02-23 19:05 ` Junio C Hamano
2016-02-23 20:38 ` Philip Oakley
@ 2016-02-25 9:21 ` Matthieu Moy
2016-02-25 9:21 ` [PATCH v2 1/2] push: remove "push.default is unset" warning message Matthieu Moy
` (2 more replies)
2 siblings, 3 replies; 11+ messages in thread
From: Matthieu Moy @ 2016-02-25 9:21 UTC (permalink / raw)
To: gitster; +Cc: git, peff, philipoakley, Matthieu Moy
Junio and Peff both lean towards removing the message completely, and
I think I'm convinced. We would have to do this in the future anyway.
While we're there, improve the manual for git push as suggested by
Philip Oakley.
Matthieu Moy (2):
push: remove "push.default is unset" warning message
Documentation/git-push: document that 'simple' is the default
Documentation/git-push.txt | 7 +++++++
builtin/push.c | 34 ----------------------------------
2 files changed, 7 insertions(+), 34 deletions(-)
--
2.7.2.334.g35ed2ae.dirty
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 1/2] push: remove "push.default is unset" warning message
2016-02-25 9:21 ` [PATCH v2 0/2] Remove "push.default unset" warning Matthieu Moy
@ 2016-02-25 9:21 ` Matthieu Moy
2016-02-25 9:22 ` [PATCH v2 2/2] Documentation/git-push: document that 'simple' is the default Matthieu Moy
2016-02-26 10:54 ` [PATCH v2 0/2] Remove "push.default unset" warning Jeff King
2 siblings, 0 replies; 11+ messages in thread
From: Matthieu Moy @ 2016-02-25 9:21 UTC (permalink / raw)
To: gitster; +Cc: git, peff, philipoakley, Matthieu Moy
The warning was important before the 2.0 transition, and remained
important for a while after, so that new users get push.default
explicitly in their configuration and do not experience inconsistent
behavior if they ever used an older version of Git.
The warning has been there since version 1.8.0 (Oct 2012), hence we can
expect the vast majority of current Git users to have been exposed to
it, and most of them have already set push.default explicitly. The
switch from 'matching' to 'simple' was planned for 2.0 (May 2014), but
actually happened only for 2.3 (Feb 2015).
Today, the warning is mostly seen by beginners, who have not set their
push.default configuration (yet). For many of them, the warning is
confusing because it talks about concepts that they have not learned and
asks them a choice that they are not able to make yet. See for example
http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0
(1260 votes for the question, 1824 for the answer as of writing)
Remove the warning completely to avoid disturbing beginners. People who
still occasionally use an older version of Git will be exposed to the
warning through this old version.
Eventually, versions of Git without the warning will be deployed enough
and tutorials will not need to advise setting push.default anymore.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
builtin/push.c | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/builtin/push.c b/builtin/push.c
index 960ffc3..270db40 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -204,37 +204,6 @@ static void setup_push_current(struct remote *remote, struct branch *branch)
add_refspec(branch->name);
}
-static char warn_unspecified_push_default_msg[] =
-N_("push.default is unset; its implicit value has changed in\n"
- "Git 2.0 from 'matching' to 'simple'. To squelch this message\n"
- "and maintain the traditional behavior, use:\n"
- "\n"
- " git config --global push.default matching\n"
- "\n"
- "To squelch this message and adopt the new behavior now, use:\n"
- "\n"
- " git config --global push.default simple\n"
- "\n"
- "When push.default is set to 'matching', git will push local branches\n"
- "to the remote branches that already exist with the same name.\n"
- "\n"
- "Since Git 2.0, Git defaults to the more conservative 'simple'\n"
- "behavior, which only pushes the current branch to the corresponding\n"
- "remote branch that 'git pull' uses to update the current branch.\n"
- "\n"
- "See 'git help config' and search for 'push.default' for further information.\n"
- "(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\n"
- "'current' instead of 'simple' if you sometimes use older versions of Git)");
-
-static void warn_unspecified_push_default_configuration(void)
-{
- static int warn_once;
-
- if (warn_once++)
- return;
- warning("%s\n", _(warn_unspecified_push_default_msg));
-}
-
static int is_workflow_triangular(struct remote *remote)
{
struct remote *fetch_remote = remote_get(NULL);
@@ -253,9 +222,6 @@ static void setup_default_push_refspecs(struct remote *remote)
break;
case PUSH_DEFAULT_UNSPECIFIED:
- warn_unspecified_push_default_configuration();
- /* fallthru */
-
case PUSH_DEFAULT_SIMPLE:
if (triangular)
setup_push_current(remote, branch);
--
2.7.2.334.g35ed2ae.dirty
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 2/2] Documentation/git-push: document that 'simple' is the default
2016-02-25 9:21 ` [PATCH v2 0/2] Remove "push.default unset" warning Matthieu Moy
2016-02-25 9:21 ` [PATCH v2 1/2] push: remove "push.default is unset" warning message Matthieu Moy
@ 2016-02-25 9:22 ` Matthieu Moy
2016-02-26 10:54 ` [PATCH v2 0/2] Remove "push.default unset" warning Jeff King
2 siblings, 0 replies; 11+ messages in thread
From: Matthieu Moy @ 2016-02-25 9:22 UTC (permalink / raw)
To: gitster; +Cc: git, peff, philipoakley, Matthieu Moy
The default behavior is well documented already in git-config(1), but
git-push(1) itself did not mention it at all. For users willing to learn
how "git push" works but not how to configure it, this makes the
documentation cumbersome to read.
Make the git-push(1) page self-contained by adding a short summary of
what 'push.default=simple' does, early in the page.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Documentation/git-push.txt | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 32482ce..a992793 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -37,6 +37,13 @@ the default `<refspec>` by consulting `remote.*.push` configuration,
and if it is not found, honors `push.default` configuration to decide
what to push (See linkgit:git-config[1] for the meaning of `push.default`).
+When neither the command-line nor the configuration specify what to
+push, the default behavior is used, which corresponds to the `simple`
+value for `push.default`: the current branch is pushed to the
+corresponding upstream branch, but as a safety measure, the push is
+aborted if the upstream branch does not have the same name as the
+local one.
+
OPTIONS[[OPTIONS]]
------------------
--
2.7.2.334.g35ed2ae.dirty
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/2] Remove "push.default unset" warning
2016-02-25 9:21 ` [PATCH v2 0/2] Remove "push.default unset" warning Matthieu Moy
2016-02-25 9:21 ` [PATCH v2 1/2] push: remove "push.default is unset" warning message Matthieu Moy
2016-02-25 9:22 ` [PATCH v2 2/2] Documentation/git-push: document that 'simple' is the default Matthieu Moy
@ 2016-02-26 10:54 ` Jeff King
2 siblings, 0 replies; 11+ messages in thread
From: Jeff King @ 2016-02-26 10:54 UTC (permalink / raw)
To: Matthieu Moy; +Cc: gitster, git, philipoakley
On Thu, Feb 25, 2016 at 10:21:58AM +0100, Matthieu Moy wrote:
> Junio and Peff both lean towards removing the message completely, and
> I think I'm convinced. We would have to do this in the future anyway.
Unsurprisingly, this series looks good to me. :)
-Peff
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-02-26 10:54 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 14:59 [PATCH] push: shorten "push.default is unset" warning message Matthieu Moy
2016-02-23 19:05 ` Junio C Hamano
2016-02-23 19:47 ` Matthieu Moy
2016-02-24 10:11 ` Jeff King
2016-02-23 20:38 ` Philip Oakley
2016-02-23 21:03 ` Matthieu Moy
2016-02-23 21:04 ` [PATCH] Documentation/git-push: document that 'simple' is the default Matthieu Moy
2016-02-25 9:21 ` [PATCH v2 0/2] Remove "push.default unset" warning Matthieu Moy
2016-02-25 9:21 ` [PATCH v2 1/2] push: remove "push.default is unset" warning message Matthieu Moy
2016-02-25 9:22 ` [PATCH v2 2/2] Documentation/git-push: document that 'simple' is the default Matthieu Moy
2016-02-26 10:54 ` [PATCH v2 0/2] Remove "push.default unset" warning Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).