threads / patch / 35060

v2push: Enhance unspecified push default warning

Subject: [PATCH v2] push: Enhance unspecified push default warning

## tl;dr

2 messages between Oct 3, 2013 and Oct 3, 2013. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Greg Jacobson· Oct 3, 2013, 20:43 UTC · lore

When the unset push.default warning message is displayed this may be the first time many users encounter push.default. Modified the warning message to explain in a compact manner what push.default is and why it is being changed in Git 2.0. Also provided additional information to help users decide if this change will affect their workflow.

Signed-off-by: Greg Jacobson <coder5000@gmail.com>
---
 builtin/push.c | 9 +++++++++
 1 file changed, 9 insertions(+)
Show changes to builtin/push.c +9 −0
diff --git a/builtin/push.c b/builtin/push.c
index 7b1b66c..eb7a721 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -174,6 +174,15 @@ 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 all local branches\n"
+   "to the remote branches with the same (matching) name.  This will no\n"
+   "longer be the default in Git 2.0 because a branch could be\n"
+   "unintentionally pushed to a remote.\n"
+   "\n"
+   "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"
+   "\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.4.474.g128a96c.dirty
Philip Oakley· Oct 3, 2013, 21:11 UTC · re: Greg Jacobson · lore

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

From: "Greg Jacobson" <coder5000@gmail.com>
Show 21 quoted lines
> When the unset push.default warning message is displayed
> this may be the first time many users encounter push.default.
> Modified the warning message to explain in a compact
> manner what push.default is and why it is being changed in
> Git 2.0.  Also provided additional information to help users
> decide if this change will affect their workflow.
>
> Signed-off-by: Greg Jacobson <coder5000@gmail.com>
> ---
> builtin/push.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/builtin/push.c b/builtin/push.c
> index 7b1b66c..eb7a721 100644
> --- a/builtin/push.c
> +++ b/builtin/push.c
> @@ -174,6 +174,15 @@ N_("push.default is unset; its implicit value is
> changing in\n"
>    "\n"
>    "  git config --global push.default simple\n"
>    "\n"
Should 'matching' and 'simple' be quoted below for additional clarity?
> +   "When push.default is set to matching git will push all local 
> branches\n"

"When push.default is set to 'matching', git will push all local branches\n"

Show 7 quoted lines
> +   "to the remote branches with the same (matching) name.  This will 
> no\n"
> +   "longer be the default in Git 2.0 because a branch could be\n"
> +   "unintentionally pushed to a remote.\n"
> +   "\n"
> +   "In Git 2.0 the new push.default of simple will push only the 
> current\n"

"In Git 2.0 the new push.default of 'simple' will push only the current\n"

Show 12 quoted lines
> +   "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"
> +   "\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)");
> -- 
Philip 

← back to recent threads