Re: [PATCH v3] push: Enhance unspecified push default warning

Subsystems: the rest

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v3] push: Enhance unspecified push default warning

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:13

Marc Branchaud [off-list ref] writes:
quoted
-   "In Git 2.0 the new push.default of 'simple' will push only the current\n"
-   "branch to the same remote branch used by git pull.   A push will\n"
-   "only succeed if the remote and local branches have the same name.\n"
+   "In Git 2.0, Git will default to the more conservative 'simple'\n"
+   "behavior that only pushes the current branch to the corresponding\n"
+   "remote branch used by 'git pull' to update the current branch from.\n"
That reads a bit awkwardly.  How about:

	In Git 2.0, Git will default to the more conservative 'simple'
	behavior, which only pushes the current branch to the corresponding
	remote branch that 'git pull' uses to update the current branch.
OK, here is the version of Greg's patch (i.e. for versions before
2.0) with the above.  The endgame patch for 2.0 would change the
line that begins with "In Git 2.0," to:

	Since Git 2.0, Git defaults to the more conservative ...

Is everybody happy with this version?

-- >8 --
From: Greg Jacobson <redacted>
Date: Fri, 4 Oct 2013 10:20:07 -0400
Subject: [PATCH] push: Enhance unspecified push default warning

When the unset push.default warning message is displayed this may be
the first time many users encounter push.default.

Explain in the warning message in a compact manner what push.default
is and what the change means to the end-user to help the users decide.

Signed-off-by: Greg Jacobson <redacted>
Helped-by: Jonathan Nieder [off-list ref]
Helped-by: Matthieu Moy [off-list ref]
Helped-by: Marc Branchaud [off-list ref]
Signed-off-by: Junio C Hamano <redacted>
---
 builtin/push.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/builtin/push.c b/builtin/push.c
index 7b1b66c..a73982a 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -174,6 +174,13 @@ N_("push.default is unset; its implicit value is changing in\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"
+   "In Git 2.0, Git will default 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)");
-- 
1.8.5-rc1-310-g1febc12

Re: [PATCH v3] push: Enhance unspecified push default warning

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:59:13

Junio C Hamano wrote:
Is everybody happy with this version?
Looks good to me.

Thanks,
Jonathan

Re: [PATCH v3] push: Enhance unspecified push default warning

From: Marc Branchaud <hidden>
Date: 2016-06-15 22:59:13

On 13-11-11 12:02 PM, Junio C Hamano wrote:
Is everybody happy with this version?
Looks good.

		M.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help