{"thread":{"id":"35065","subject":"[PATCH v3] push: Enhance unspecified push default warning","startedAt":"2013-10-04T14:20:07Z","lastAt":"2013-11-11T21:12:51Z","messageCount":20,"participants":["Greg Jacobson","Junio C Hamano","Matthieu Moy","Jonathan Nieder","Marc Branchaud"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"228560","messageId":"CAKYC+eKCsRbF=6HtcY8ZtaafTDpbMFJ1tyWbaZDKrmbzdnOoUw@mail.gmail.com","threadId":"35065","inReplyTo":null,"subject":"[PATCH v3] push: Enhance unspecified push default warning","fromName":"Greg Jacobson","fromEmail":"coder5000@gmail.com","sentAt":"2013-10-04T14:20:07Z","receivedAt":"2013-10-04T14:20:07Z","isPatch":true,"sender":{"key":"coder5000@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1053650?v=4"},"body":"When the unset push.default warning message is displayed\nthis may be the first time many users encounter push.default.\nModified the warning message to explain in a compact\nmanner what push.default is and why it is being changed in\nGit 2.0.  Also provided additional information to help users\ndecide if this change will affect their workflow.\n\nSigned-off-by: Greg Jacobson <coder5000@gmail.com>\n---\n builtin/push.c | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 7b1b66c..5393e28 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -174,6 +174,15 @@ N_(\"push.default is unset; its implicit value is\nchanging in\\n\"\n    \"\\n\"\n    \"  git config --global push.default simple\\n\"\n    \"\\n\"\n+   \"When push.default is set to 'matching', git will push all local branches\\n\"\n+   \"to the remote branches with the same (matching) name.  This will no\\n\"\n+   \"longer be the default in Git 2.0 because a branch could be\\n\"\n+   \"unintentionally pushed to a remote.\\n\"\n+   \"\\n\"\n+   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n+   \"branch to the same remote branch used by git pull.   A push will\\n\"\n+   \"only succeed if the remote and local branches have the same name.\\n\"\n+   \"\\n\"\n    \"See 'git help config' and search for 'push.default' for further\ninformation.\\n\"\n    \"(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\\n\"\n    \"'current' instead of 'simple' if you sometimes use older versions\nof Git)\");\n-- \n1.8.4.474.g128a96c.dirty\n"},{"id":"230052","messageId":"CAKYC+eLvx1vB1ZDqYK=7Dg68QuCojBdSAVQZMF6HBtfxu_b_aw@mail.gmail.com","threadId":"35065","inReplyTo":"CAKYC+eKCsRbF=6HtcY8ZtaafTDpbMFJ1tyWbaZDKrmbzdnOoUw@mail.gmail.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Greg Jacobson","fromEmail":"coder5000@gmail.com","sentAt":"2013-11-03T13:35:51Z","receivedAt":"2013-11-03T13:35:51Z","isPatch":true,"sender":{"key":"coder5000@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1053650?v=4"},"body":"Is there anything I could do to improve this patch?  Thank you.\n\nOn Fri, Oct 4, 2013 at 10:20 AM, Greg Jacobson <coder5000@gmail.com> wrote:\n> When the unset push.default warning message is displayed\n> this may be the first time many users encounter push.default.\n> Modified the warning message to explain in a compact\n> manner what push.default is and why it is being changed in\n> Git 2.0.  Also provided additional information to help users\n> decide if this change will affect their workflow.\n>\n> Signed-off-by: Greg Jacobson <coder5000@gmail.com>\n> ---\n>  builtin/push.c | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n>\n> diff --git a/builtin/push.c b/builtin/push.c\n> index 7b1b66c..5393e28 100644\n> --- a/builtin/push.c\n> +++ b/builtin/push.c\n> @@ -174,6 +174,15 @@ N_(\"push.default is unset; its implicit value is\n> changing in\\n\"\n>     \"\\n\"\n>     \"  git config --global push.default simple\\n\"\n>     \"\\n\"\n> +   \"When push.default is set to 'matching', git will push all local branches\\n\"\n> +   \"to the remote branches with the same (matching) name.  This will no\\n\"\n> +   \"longer be the default in Git 2.0 because a branch could be\\n\"\n> +   \"unintentionally pushed to a remote.\\n\"\n> +   \"\\n\"\n> +   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n> +   \"branch to the same remote branch used by git pull.   A push will\\n\"\n> +   \"only succeed if the remote and local branches have the same name.\\n\"\n> +   \"\\n\"\n>     \"See 'git help config' and search for 'push.default' for further\n> information.\\n\"\n>     \"(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\\n\"\n>     \"'current' instead of 'simple' if you sometimes use older versions\n> of Git)\");\n> --\n> 1.8.4.474.g128a96c.dirty\n"},{"id":"230082","messageId":"xmqqvc08yq4v.fsf@gitster.dls.corp.google.com","threadId":"35065","inReplyTo":"CAKYC+eLvx1vB1ZDqYK=7Dg68QuCojBdSAVQZMF6HBtfxu_b_aw@mail.gmail.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-04T18:32:16Z","receivedAt":"2013-11-04T18:32:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Greg Jacobson <coder5000@gmail.com> writes:\n\n> Is there anything I could do to improve this patch?  Thank you.\n\nMy vague recollection is that we started from an excerpt from the\ndocumentation page, not unlike this patch attempts to, but because\nsuch an excerpt has to be less complete than the documentation for\nbrevity's sake, it is bound to be an incorrect and/or misleading\none, and decided that we are better off referring the users, who do\nwant to choose something other than the default we chose, to the\ndocumentation.\n\nSomebody cares to dig up the old discussion threads and post a few\npointers?\n\n> On Fri, Oct 4, 2013 at 10:20 AM, Greg Jacobson <coder5000@gmail.com> wrote:\n>> When the unset push.default warning message is displayed\n>> this may be the first time many users encounter push.default.\n>> Modified the warning message to explain in a compact\n>> manner what push.default is and why it is being changed in\n>> Git 2.0.  Also provided additional information to help users\n>> decide if this change will affect their workflow.\n>>\n>> Signed-off-by: Greg Jacobson <coder5000@gmail.com>\n>> ---\n>>  builtin/push.c | 9 +++++++++\n>>  1 file changed, 9 insertions(+)\n>>\n>> diff --git a/builtin/push.c b/builtin/push.c\n>> index 7b1b66c..5393e28 100644\n>> --- a/builtin/push.c\n>> +++ b/builtin/push.c\n>> @@ -174,6 +174,15 @@ N_(\"push.default is unset; its implicit value is\n>> changing in\\n\"\n>>     \"\\n\"\n>>     \"  git config --global push.default simple\\n\"\n>>     \"\\n\"\n>> +   \"When push.default is set to 'matching', git will push all local branches\\n\"\n>> +   \"to the remote branches with the same (matching) name.  This will no\\n\"\n>> +   \"longer be the default in Git 2.0 because a branch could be\\n\"\n>> +   \"unintentionally pushed to a remote.\\n\"\n>> +   \"\\n\"\n>> +   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n>> +   \"branch to the same remote branch used by git pull.   A push will\\n\"\n>> +   \"only succeed if the remote and local branches have the same name.\\n\"\n>> +   \"\\n\"\n>>     \"See 'git help config' and search for 'push.default' for further\n>> information.\\n\"\n>>     \"(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\\n\"\n>>     \"'current' instead of 'simple' if you sometimes use older versions\n>> of Git)\");\n>> --\n>> 1.8.4.474.g128a96c.dirty\n"},{"id":"230114","messageId":"1096759644.4893066.1383646568978.JavaMail.root@imag.fr","threadId":"35065","inReplyTo":"xmqqvc08yq4v.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-11-05T10:16:08Z","receivedAt":"2013-11-05T10:16:08Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"----- Original Message -----\n> Greg Jacobson <coder5000@gmail.com> writes:\n> \n> > Is there anything I could do to improve this patch?  Thank you.\n> \n> My vague recollection is that we started from an excerpt from the\n> documentation page, not unlike this patch attempts to, but because\n> such an excerpt has to be less complete than the documentation for\n> brevity's sake, it is bound to be an incorrect and/or misleading\n> one, and decided that we are better off referring the users, who do\n> want to choose something other than the default we chose, to the\n> documentation.\n> \n> Somebody cares to dig up the old discussion threads and post a few\n> pointers?\n\nThe previous versions of this patch received only minor comments,\nwhich were taken into account:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/235675\nhttp://thread.gmane.org/gmane.comp.version-control.git/235694\n\nI don't remember all the discussions on the patch which introduced\nthe warning, but I don't think it's relevant to digg them before applying the patch:\n\n* The assumption was that users would read the docs, but as I already mentioned:\n  \"Judging by the question asked on stackoverflow\n  ( http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0 )\n  and its popularity, telling the users to read the docs did not work very\n  well.\"\n\n* The warning has been there for a while now. Advanced users have already set push.default.\n  We shouldn't be worried about eating a bit of screen real estate for users who didn't yet.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"230115","messageId":"1839883487.4893076.1383646619137.JavaMail.root@imag.fr","threadId":"35065","inReplyTo":"xmqqvc08yq4v.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-11-05T10:16:59Z","receivedAt":"2013-11-05T10:16:59Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"----- Original Message -----\n> Greg Jacobson <coder5000@gmail.com> writes:\n> \n> > Is there anything I could do to improve this patch?  Thank you.\n> \n> My vague recollection is that we started from an excerpt from the\n> documentation page, not unlike this patch attempts to, but because\n> such an excerpt has to be less complete than the documentation for\n> brevity's sake, it is bound to be an incorrect and/or misleading\n> one, and decided that we are better off referring the users, who do\n> want to choose something other than the default we chose, to the\n> documentation.\n> \n> Somebody cares to dig up the old discussion threads and post a few\n> pointers?\n\nThe previous versions of this patch received only minor comments,\nwhich were taken into account:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/235675\nhttp://thread.gmane.org/gmane.comp.version-control.git/235694\n\nI don't remember all the discussions on the patch which introduced\nthe warning, but I don't think it's relevant to digg them before applying the patch:\n\n* The assumption was that users would read the docs, but as I already mentioned:\n  \"Judging by the question asked on stackoverflow\n  ( http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0 )\n  and its popularity, telling the users to read the docs did not work very\n  well.\"\n\n* The warning has been there for a while now. Advanced users have already set push.default.\n  We shouldn't be worried about eating a bit of screen real estate for users who didn't yet.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"230149","messageId":"xmqqk3gl8id0.fsf@gitster.dls.corp.google.com","threadId":"35065","inReplyTo":"1839883487.4893076.1383646619137.JavaMail.root@imag.fr","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-06T19:01:31Z","receivedAt":"2013-11-06T19:01:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <matthieu.moy@grenoble-inp.fr> writes:\n\n> I don't remember all the discussions on the patch which introduced\n> the warning, but I don't think it's relevant to digg them before applying the patch:\n\nIf we apply the patch then it is too late to dig them ;-)\n\n> * The assumption was that users would read the docs, but as I already mentioned:\n>   \"Judging by the question asked on stackoverflow\n>   ( http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0 )\n>   and its popularity, telling the users to read the docs did not work very\n>   well.\"\n\nThat is true, but does it justify giving a misleading information in\nthe advice message?\n\nSpecifically:\n\n>> +   \"When push.default is set to 'matching', git will push all local branches\\n\"\n>> +   \"to the remote branches with the same (matching) name.\n\ninvites those who do not read documentation to mistake it with using\nan explicit \"refs/heads/*:refs/heads/*\" refspec.\n\nAnd this one\n\n>> +   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n>> +   \"branch to the same remote branch used by git pull.   A push will\\n\"\n>> +   \"only succeed if the remote and local branches have the same name.\\n\"\n\nwhile you can see that it is not telling a lie if you read it twice,\n\"will only succeed if\" feels somewhat roundabout.\n\n\t... push only the current branch back to the branch of the\n\tsame name, but only if 'git pull' is set to pull from that\n\tbranch. Otherwise the push will fail.\n\nmight be an improvement, but I dunno.\n\n> * The warning has been there for a while now. Advanced users have\n> already set push.default.  We shouldn't be worried about eating a\n> bit of screen real estate for users who didn't yet.\n\nThis part I can agree with.\n"},{"id":"230152","messageId":"xmqqfvr98f5h.fsf@gitster.dls.corp.google.com","threadId":"35065","inReplyTo":"xmqqk3gl8id0.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-06T20:10:50Z","receivedAt":"2013-11-06T20:10:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Matthieu Moy <matthieu.moy@grenoble-inp.fr> writes:\n>\n>> I don't remember all the discussions on the patch which introduced\n>> the warning, but I don't think it's relevant to digg them before applying the patch:\n>\n> If we apply the patch then it is too late to dig them ;-)\n>\n>> * The assumption was that users would read the docs, but as I already mentioned:\n>>   \"Judging by the question asked on stackoverflow\n>>   ( http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0 )\n>>   and its popularity, telling the users to read the docs did not work very\n>>   well.\"\n>\n> That is true, but does it justify giving a misleading information in\n> the advice message?\n\nAlso applying this will have an unpleasant fallout to merging the\nendgame patch b2ed944a (push: switch default from \"matching\" to\n\"simple\", 2013-01-04).  The added text needs to be corrected with an\nevil merge.\n\nI'd prefer to having worry about such a fallout only once.  Which\narguably we already did when we came up with the current message, so\nI am fairly annoyed by this patch coming loooooong after we\nconcluded the original discussion.\n\nSigh X-<.  I'll worry about this later, as b2ed944a is in 'next'\nduring the feature freeze, and I'd prefer not having to rebase it on\ntop of the final version of this patch.\n"},{"id":"230159","messageId":"vpq1u2tb3px.fsf@anie.imag.fr","threadId":"35065","inReplyTo":"xmqqk3gl8id0.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-11-06T21:49:30Z","receivedAt":"2013-11-06T21:49:30Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> That is true, but does it justify giving a misleading information in\n> the advice message?\n\nClearly, yes. Trying to be exhaustive here is not a good idea, we'd end\nup rewritting the man page, and then users won't read the message\nbecause it's too long.\n\n> Specifically:\n>\n>>> +   \"When push.default is set to 'matching', git will push all local branches\\n\"\n>>> +   \"to the remote branches with the same (matching) name.\n>\n> invites those who do not read documentation to mistake it with using\n> an explicit \"refs/heads/*:refs/heads/*\" refspec.\n\nYes, but those who want to know the exact behavior should read the doc.\nThat's life.\n\n>>> +   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n>>> +   \"branch to the same remote branch used by git pull.   A push will\\n\"\n>>> +   \"only succeed if the remote and local branches have the same name.\\n\"\n>\n> while you can see that it is not telling a lie if you read it twice,\n> \"will only succeed if\" feels somewhat roundabout.\n>\n> \t... push only the current branch back to the branch of the\n> \tsame name, but only if 'git pull' is set to pull from that\n> \tbranch. Otherwise the push will fail.\n>\n> might be an improvement, but I dunno.\n\nI do not see much difference actually. I tend to prefer the original\nversion: to me the expected behavior is to make push and pull\nessentially symetrical, and the fact that it fails if the branch is\nnamed differently is a safety feature comming on top of that.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"230166","messageId":"xmqqiow56sxy.fsf@gitster.dls.corp.google.com","threadId":"35065","inReplyTo":"xmqqfvr98f5h.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-06T22:55:53Z","receivedAt":"2013-11-06T22:55:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Also applying this will have an unpleasant fallout to merging the\n> endgame patch b2ed944a (push: switch default from \"matching\" to\n> \"simple\", 2013-01-04).  The added text needs to be corrected with an\n> evil merge.\n>\n> I'd prefer to having worry about such a fallout only once.  Which\n> arguably we already did when we came up with the current message, so\n> I am fairly annoyed by this patch coming loooooong after we\n> concluded the original discussion.\n>\n> Sigh X-<.  I'll worry about this later, as b2ed944a is in 'next'\n> during the feature freeze, and I'd prefer not having to rebase it on\n> top of the final version of this patch.\n\nHere is a rebase of the endgame patch, on top of the result of\napplying Greg's patch (you have to fix the line-wrapping in the\nmessage, though). The only change from the version we have been\ncooking since January is the message in builtin/push.c.  I haven't\nchecked if the result merges cleanly to other topics in flight\nthough.\n\nIt will be quite messy to merge this and Greg's patch to anything\npast 3153a9e8 (Merge branch 'jc/push-2.0-default-to-simple' into\nnext, 2013-10-28), which already has the original endgame patch, so\nI'll postpone it until later (I still need to tag 1.8.5-rc1 today).\n\nThanks.\n\n-- >8 --\nSubject: [PATCH] push: switch default from \"matching\" to \"simple\"\n\nWe promised to change the behaviour of lazy \"git push [there]\" that\ndoes not say what to push on the command line from \"matching\" to\n\"simple\" in Git 2.0.\n\nThis finally flips that bit.\n\nHelped-by: Matthieu Moy <Matthieu.Moy@imag.fr>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/config.txt   | 14 ++++----------\n Documentation/git-push.txt | 10 ++++++----\n advice.c                   |  2 --\n advice.h                   |  1 -\n builtin/push.c             | 37 ++++++++++---------------------------\n 5 files changed, 20 insertions(+), 44 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex ab26963..bb45969 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -142,19 +142,13 @@ advice.*::\n --\n \tpushUpdateRejected::\n \t\tSet this variable to 'false' if you want to disable\n-\t\t'pushNonFFCurrent', 'pushNonFFDefault',\n+\t\t'pushNonFFCurrent',\n \t\t'pushNonFFMatching', 'pushAlreadyExists',\n \t\t'pushFetchFirst', and 'pushNeedsForce'\n \t\tsimultaneously.\n \tpushNonFFCurrent::\n \t\tAdvice shown when linkgit:git-push[1] fails due to a\n \t\tnon-fast-forward update to the current branch.\n-\tpushNonFFDefault::\n-\t\tAdvice to set 'push.default' to 'upstream' or 'current'\n-\t\twhen you ran linkgit:git-push[1] and pushed 'matching\n-\t\trefs' by default (i.e. you did not provide an explicit\n-\t\trefspec, and no 'push.default' configuration was set)\n-\t\tand it resulted in a non-fast-forward error.\n \tpushNonFFMatching::\n \t\tAdvice shown when you ran linkgit:git-push[1] and pushed\n \t\t'matching refs' explicitly (i.e. you used ':', or\n@@ -1929,7 +1923,7 @@ When pushing to a remote that is different from the remote you normally\n pull from, work as `current`.  This is the safest option and is suited\n for beginners.\n +\n-This mode will become the default in Git 2.0.\n+This mode has become the default in Git 2.0.\n \n * `matching` - push all branches having the same name on both ends.\n   This makes the repository you are pushing to remember the set of\n@@ -1948,8 +1942,8 @@ suitable for pushing into a shared central repository, as other\n people may add new branches there, or update the tip of existing\n branches outside your control.\n +\n-This is currently the default, but Git 2.0 will change the default\n-to `simple`.\n+This used to be the default, but not since Git 2.0 (`simple` is the\n+new default).\n \n --\n \ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 9eec740..5553f99 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -78,8 +78,8 @@ the local side, the remote side is updated if a branch of the same name\n already exists on the remote side.\n \n --all::\n-\tInstead of naming each ref to push, specifies that all\n-\trefs under `refs/heads/` be pushed.\n+\tPush all branches (i.e. refs under `refs/heads/`); cannot be\n+\tused with other <refspec>.\n \n --prune::\n \tRemove remote branches that don't have a local counterpart. For example\n@@ -437,8 +437,10 @@ Examples\n \tconfigured for the current branch).\n \n `git push origin`::\n-\tWithout additional configuration, works like\n-\t`git push origin :`.\n+\tWithout additional configuration, pushes the current branch to\n+\tthe configured upstream (`remote.origin.merge` configuration\n+\tvariable) if it has the same name as the current branch, and\n+\terrors out without pushing otherwise.\n +\n The default behavior of this command when no <refspec> is given can be\n configured by setting the `push` option of the remote, or the `push.default`\ndiff --git a/advice.c b/advice.c\nindex 3eca9f5..486f823 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -2,7 +2,6 @@\n \n int advice_push_update_rejected = 1;\n int advice_push_non_ff_current = 1;\n-int advice_push_non_ff_default = 1;\n int advice_push_non_ff_matching = 1;\n int advice_push_already_exists = 1;\n int advice_push_fetch_first = 1;\n@@ -23,7 +22,6 @@ static struct {\n } advice_config[] = {\n \t{ \"pushupdaterejected\", &advice_push_update_rejected },\n \t{ \"pushnonffcurrent\", &advice_push_non_ff_current },\n-\t{ \"pushnonffdefault\", &advice_push_non_ff_default },\n \t{ \"pushnonffmatching\", &advice_push_non_ff_matching },\n \t{ \"pushalreadyexists\", &advice_push_already_exists },\n \t{ \"pushfetchfirst\", &advice_push_fetch_first },\ndiff --git a/advice.h b/advice.h\nindex 08fbc8e..5ecc6c1 100644\n--- a/advice.h\n+++ b/advice.h\n@@ -5,7 +5,6 @@\n \n extern int advice_push_update_rejected;\n extern int advice_push_non_ff_current;\n-extern int advice_push_non_ff_default;\n extern int advice_push_non_ff_matching;\n extern int advice_push_already_exists;\n extern int advice_push_fetch_first;\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 5393e28..a79354d 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -26,7 +26,6 @@ static struct push_cas_option cas;\n static const char **refspec;\n static int refspec_nr;\n static int refspec_alloc;\n-static int default_matching_used;\n \n static void add_refspec(const char *ref)\n {\n@@ -164,9 +163,9 @@ static void setup_push_current(struct remote *remote, struct branch *branch)\n }\n \n static char warn_unspecified_push_default_msg[] =\n-N_(\"push.default is unset; its implicit value is changing in\\n\"\n+N_(\"push.default is unset; its implicit value has changed in\\n\"\n    \"Git 2.0 from 'matching' to 'simple'. To squelch this message\\n\"\n-   \"and maintain the current behavior after the default changes, use:\\n\"\n+   \"and maintain the traditional behavior, use:\\n\"\n    \"\\n\"\n    \"  git config --global push.default matching\\n\"\n    \"\\n\"\n@@ -175,11 +174,11 @@ N_(\"push.default is unset; its implicit value is changing in\\n\"\n    \"  git config --global push.default simple\\n\"\n    \"\\n\"\n    \"When push.default is set to 'matching', git will push all local branches\\n\"\n-   \"to the remote branches with the same (matching) name.  This will no\\n\"\n-   \"longer be the default in Git 2.0 because a branch could be\\n\"\n+   \"to the remote branches with the same (matching) name.  This is no\\n\"\n+   \"longer the default since Git 2.0 because a branch could be\\n\"\n    \"unintentionally pushed to a remote.\\n\"\n    \"\\n\"\n-   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n+   \"In Git 2.0 the new push.default of 'simple' pushes only the current\\n\"\n    \"branch to the same remote branch used by git pull.   A push will\\n\"\n    \"only succeed if the remote and local branches have the same name.\\n\"\n    \"\\n\"\n@@ -209,14 +208,14 @@ static void setup_default_push_refspecs(struct remote *remote)\n \n \tswitch (push_default) {\n \tdefault:\n-\tcase PUSH_DEFAULT_UNSPECIFIED:\n-\t\tdefault_matching_used = 1;\n-\t\twarn_unspecified_push_default_configuration();\n-\t\t/* fallthru */\n \tcase PUSH_DEFAULT_MATCHING:\n \t\tadd_refspec(\":\");\n \t\tbreak;\n \n+\tcase PUSH_DEFAULT_UNSPECIFIED:\n+\t\twarn_unspecified_push_default_configuration();\n+\t\t/* fallthru */\n+\n \tcase PUSH_DEFAULT_SIMPLE:\n \t\tif (triangular)\n \t\t\tsetup_push_current(remote, branch);\n@@ -245,12 +244,6 @@ static const char message_advice_pull_before_push[] =\n \t   \"'git pull ...') before pushing again.\\n\"\n \t   \"See the 'Note about fast-forwards' in 'git push --help' for details.\");\n \n-static const char message_advice_use_upstream[] =\n-\tN_(\"Updates were rejected because a pushed branch tip is behind its remote\\n\"\n-\t   \"counterpart. If you did not intend to push that branch, you may want to\\n\"\n-\t   \"specify branches to push or set the 'push.default' configuration variable\\n\"\n-\t   \"to 'simple', 'current' or 'upstream' to push only the current branch.\");\n-\n static const char message_advice_checkout_pull_push[] =\n \tN_(\"Updates were rejected because a pushed branch tip is behind its remote\\n\"\n \t   \"counterpart. Check out this branch and integrate the remote changes\\n\"\n@@ -279,13 +272,6 @@ static void advise_pull_before_push(void)\n \tadvise(_(message_advice_pull_before_push));\n }\n \n-static void advise_use_upstream(void)\n-{\n-\tif (!advice_push_non_ff_default || !advice_push_update_rejected)\n-\t\treturn;\n-\tadvise(_(message_advice_use_upstream));\n-}\n-\n static void advise_checkout_pull_push(void)\n {\n \tif (!advice_push_non_ff_matching || !advice_push_update_rejected)\n@@ -347,10 +333,7 @@ static int push_with_options(struct transport *transport, int flags)\n \tif (reject_reasons & REJECT_NON_FF_HEAD) {\n \t\tadvise_pull_before_push();\n \t} else if (reject_reasons & REJECT_NON_FF_OTHER) {\n-\t\tif (default_matching_used)\n-\t\t\tadvise_use_upstream();\n-\t\telse\n-\t\t\tadvise_checkout_pull_push();\n+\t\tadvise_checkout_pull_push();\n \t} else if (reject_reasons & REJECT_ALREADY_EXISTS) {\n \t\tadvise_ref_already_exists();\n \t} else if (reject_reasons & REJECT_FETCH_FIRST) {\n-- \n1.8.5-rc0-343-g6932893\n"},{"id":"230170","messageId":"20131106234544.GF10302@google.com","threadId":"35065","inReplyTo":"vpq1u2tb3px.fsf@anie.imag.fr","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-06T23:45:44Z","receivedAt":"2013-11-06T23:45:44Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n\n>> Specifically:\n>>\n>>>> +   \"When push.default is set to 'matching', git will push all local branches\\n\"\n>>>> +   \"to the remote branches with the same (matching) name.\n>>\n>> invites those who do not read documentation to mistake it with using\n>> an explicit \"refs/heads/*:refs/heads/*\" refspec.\n>\n> Yes, but those who want to know the exact behavior should read the doc.\n> That's life.\n\nSurely we can do better?\n\nFor example:\n\n\tWhen push.default is set to 'matching', git will push local branches\n\tto remote branches that already exist with the same (matching) name.\n\n>>>> +   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n>>>> +   \"branch to the same remote branch used by git pull.   A push will\\n\"\n>>>> +   \"only succeed if the remote and local branches have the same name.\\n\"\n>>\n>> while you can see that it is not telling a lie if you read it twice,\n>> \"will only succeed if\" feels somewhat roundabout.\n>>\n>> \t... push only the current branch back to the branch of the\n>> \tsame name, but only if 'git pull' is set to pull from that\n>> \tbranch. Otherwise the push will fail.\n>>\n>> might be an improvement, but I dunno.\n>\n> I do not see much difference actually. I tend to prefer the original\n> version: to me the expected behavior is to make push and pull\n> essentially symetrical, and the fact that it fails if the branch is\n> named differently is a safety feature comming on top of that.\n\nPerhaps:\n\n\tIn Git 2.0 (or now, if push.default is set to 'simple'), git will behave\n\tmore conservatively by pushing only the current branch to the corresponding\n\tremote branch used by \"git pull\", and only if the remote and local branches\n\thave the same name.\n\nExcept that forgets the exception having to do with triangular\nworkflows.  So maybe:\n\n\tIn Git 2.0, git will default to a more conservative 'simple' behavior\n\tthat only pushes the current branch.\n\nHope that helps,\nJonathan\n"},{"id":"230179","messageId":"vpqtxfo8ow4.fsf@anie.imag.fr","threadId":"35065","inReplyTo":"20131106234544.GF10302@google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-11-07T10:52:43Z","receivedAt":"2013-11-07T10:52:43Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> \tWhen push.default is set to 'matching', git will push local branches\n> \tto remote branches that already exist with the same (matching) name.\n\nYes, that's better than the original patch (and remains two lines).\n\n>>>>> +   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n>>>>> +   \"branch to the same remote branch used by git pull.   A push will\\n\"\n>>>>> +   \"only succeed if the remote and local branches have the same name.\\n\"\n>>>\n>>> while you can see that it is not telling a lie if you read it twice,\n>>> \"will only succeed if\" feels somewhat roundabout.\n>>>\n>>> \t... push only the current branch back to the branch of the\n>>> \tsame name, but only if 'git pull' is set to pull from that\n>>> \tbranch. Otherwise the push will fail.\n>>>\n>>> might be an improvement, but I dunno.\n>>\n>> I do not see much difference actually. I tend to prefer the original\n>> version: to me the expected behavior is to make push and pull\n>> essentially symetrical, and the fact that it fails if the branch is\n>> named differently is a safety feature comming on top of that.\n>\n> Perhaps:\n>\n> \tIn Git 2.0 (or now, if push.default is set to 'simple'), git will behave\n> \tmore conservatively by pushing only the current branch to the corresponding\n> \tremote branch used by \"git pull\", and only if the remote and local branches\n> \thave the same name.\n\nI prefered the original, as it had two sentences. Reading only the first\none gave the important information.\n\n> \tIn Git 2.0, git will default to a more conservative 'simple' behavior\n> \tthat only pushes the current branch.\n\nThat's an option too, but I think mentionning \"git pull\" was a good\nidea.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"230203","messageId":"xmqqr4as5bbh.fsf@gitster.dls.corp.google.com","threadId":"35065","inReplyTo":"vpqtxfo8ow4.fsf@anie.imag.fr","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-07T18:14:10Z","receivedAt":"2013-11-07T18:14:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n>> \tWhen push.default is set to 'matching', git will push local branches\n>> \tto remote branches that already exist with the same (matching) name.\n>\n> Yes, that's better than the original patch (and remains two lines).\n>\n>>>>>> +   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n>>>>>> +   \"branch to the same remote branch used by git pull.   A push will\\n\"\n>>>>>> +   \"only succeed if the remote and local branches have the same name.\\n\"\n>>>>\n>>>> while you can see that it is not telling a lie if you read it twice,\n>>>> \"will only succeed if\" feels somewhat roundabout.\n>>>>\n>>>> \t... push only the current branch back to the branch of the\n>>>> \tsame name, but only if 'git pull' is set to pull from that\n>>>> \tbranch. Otherwise the push will fail.\n>>>>\n>>>> might be an improvement, but I dunno.\n>>>\n>>> I do not see much difference actually. I tend to prefer the original\n>>> version: to me the expected behavior is to make push and pull\n>>> essentially symetrical, and the fact that it fails if the branch is\n>>> named differently is a safety feature comming on top of that.\n>>\n>> Perhaps:\n>>\n>> \tIn Git 2.0 (or now, if push.default is set to 'simple'), git will behave\n>> \tmore conservatively by pushing only the current branch to the corresponding\n>> \tremote branch used by \"git pull\", and only if the remote and local branches\n>> \thave the same name.\n>\n> I prefered the original, as it had two sentences. Reading only the first\n> one gave the important information.\n\nActually, to me, I found the \"two sentences\" the worst part in the\noriginal.  It made it sound as if the default will be switching to\n'upstream', and all readers need to read the second sentence that\nclarifies that it is not the case, in a somewhat round-about\nway---\"will only succeed if\" invites \"and otherwise...?\"\n\n>> \tIn Git 2.0, git will default to a more conservative 'simple' behavior\n>> \tthat only pushes the current branch.\n>\n> That's an option too, but I think mentionning \"git pull\" was a good\n> idea.\n\nYes, mentioning \"git pull\" is a good idea throughout these\nproposals.\n"},{"id":"230207","messageId":"vpqtxfo2ggt.fsf@anie.imag.fr","threadId":"35065","inReplyTo":"xmqqr4as5bbh.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-11-07T18:51:14Z","receivedAt":"2013-11-07T18:51:14Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Actually, to me, I found the \"two sentences\" the worst part in the\n> original.  It made it sound as if the default will be switching to\n> 'upstream', and all readers need to read the second sentence that\n> clarifies that it is not the case, in a somewhat round-about\n> way---\"will only succeed if\" invites \"and otherwise...?\"\n\nTo me, this is not an issue given the audience (people too lazy to read\nthe docs): for them, current == simple == upstream modulo details\nthey're not interested about. The safety measure of \"simple\" is actually\nhere to make sure nothing wrong happens if they make the confusion.\n\nBut that's just a preference, I'm OK with your other proposal too.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"230242","messageId":"xmqqli0yojp8.fsf@gitster.dls.corp.google.com","threadId":"35065","inReplyTo":"vpqtxfo8ow4.fsf@anie.imag.fr","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-08T18:02:43Z","receivedAt":"2013-11-08T18:02:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n>> \tWhen push.default is set to 'matching', git will push local branches\n>> \tto remote branches that already exist with the same (matching) name.\n>\n> Yes, that's better than the original patch (and remains two lines).\n> ...\n>\n>> \tIn Git 2.0, git will default to a more conservative 'simple' behavior\n>> \tthat only pushes the current branch.\n>\n> That's an option too, but I think mentionning \"git pull\" was a good\n> idea.\n\nOK, I'll tentatively update the draft to read like this, redo the\nendgame patch on top and requeue.\n\n builtin/push.c | 12 +++++-------\n 1 file changed, 5 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 5393e28..27c5754 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -174,14 +174,12 @@ N_(\"push.default is unset; its implicit value is changing in\\n\"\n    \"\\n\"\n    \"  git config --global push.default simple\\n\"\n    \"\\n\"\n-   \"When push.default is set to 'matching', git will push all local branches\\n\"\n-   \"to the remote branches with the same (matching) name.  This will no\\n\"\n-   \"longer be the default in Git 2.0 because a branch could be\\n\"\n-   \"unintentionally pushed to a remote.\\n\"\n+   \"When push.default is set to 'matching', git will push local branches\\n\"\n+   \"to the remote branches that already exist with the same name.\\n\"\n    \"\\n\"\n-   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n-   \"branch to the same remote branch used by git pull.   A push will\\n\"\n-   \"only succeed if the remote and local branches have the same name.\\n\"\n+   \"In Git 2.0, Git will default to the more conservative 'simple'\\n\"\n+   \"behavior that only pushes the current branch to the corresponding\\n\"\n+   \"remote branch used by 'git pull' to update the current branch from.\\n\"\n    \"\\n\"\n    \"See 'git help config' and search for 'push.default' for further information.\\n\"\n    \"(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\\n\"\n"},{"id":"230244","messageId":"xmqqhabmoh7i.fsf@gitster.dls.corp.google.com","threadId":"35065","inReplyTo":"xmqqli0yojp8.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-08T18:56:33Z","receivedAt":"2013-11-08T18:56:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> OK, I'll tentatively update the draft to read like this, redo the\n> endgame patch on top and requeue.\n\n... and the corresponding part of the endgame patch now reads like\nthis.  I suspect that we may want a bigger change to unstress\n'simple' at that phase of the transition, though, by perhaps\nrewording the 'matching' part to make it more explicit that the\nsetting is primarily for those who want to keep the traditional\nbehaviour.\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 27c5754..a0534d0 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n ...\n@@ -164,9 +163,9 @@ static void setup_push_current(struct remote *remote, struct branch *branch)\n }\n \n static char warn_unspecified_push_default_msg[] =\n-N_(\"push.default is unset; its implicit value is changing in\\n\"\n+N_(\"push.default is unset; its implicit value has changed in\\n\"\n    \"Git 2.0 from 'matching' to 'simple'. To squelch this message\\n\"\n-   \"and maintain the current behavior after the default changes, use:\\n\"\n+   \"and maintain the traditional behavior, use:\\n\"\n    \"\\n\"\n    \"  git config --global push.default matching\\n\"\n    \"\\n\"\n@@ -177,7 +176,7 @@ N_(\"push.default is unset; its implicit value is changing in\\n\"\n    \"When push.default is set to 'matching', git will push local branches\\n\"\n    \"to the remote branches that already exist with the same name.\\n\"\n    \"\\n\"\n-   \"In Git 2.0, Git will default to the more conservative 'simple'\\n\"\n+   \"Since Git 2.0, Git defaults to the more conservative 'simple'\\n\"\n    \"behavior that only pushes the current branch to the corresponding\\n\"\n    \"remote branch used by 'git pull' to update the current branch from.\\n\"\n    \"\\n\"\n@@ -207,14 +206,14 @@ static void setup_default_push_refspecs(struct remote *remote)\n ... \n"},{"id":"230252","messageId":"527D6805.3050303@xiplink.com","threadId":"35065","inReplyTo":"xmqqli0yojp8.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2013-11-08T22:39:01Z","receivedAt":"2013-11-08T22:39:01Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 13-11-08 01:02 PM, Junio C Hamano wrote:\n> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n> \n>> Jonathan Nieder <jrnieder@gmail.com> writes:\n>>\n>>> \tWhen push.default is set to 'matching', git will push local branches\n>>> \tto remote branches that already exist with the same (matching) name.\n>>\n>> Yes, that's better than the original patch (and remains two lines).\n>> ...\n>>\n>>> \tIn Git 2.0, git will default to a more conservative 'simple' behavior\n>>> \tthat only pushes the current branch.\n>>\n>> That's an option too, but I think mentionning \"git pull\" was a good\n>> idea.\n> \n> OK, I'll tentatively update the draft to read like this, redo the\n> endgame patch on top and requeue.\n> \n>  builtin/push.c | 12 +++++-------\n>  1 file changed, 5 insertions(+), 7 deletions(-)\n> \n> diff --git a/builtin/push.c b/builtin/push.c\n> index 5393e28..27c5754 100644\n> --- a/builtin/push.c\n> +++ b/builtin/push.c\n> @@ -174,14 +174,12 @@ N_(\"push.default is unset; its implicit value is changing in\\n\"\n>     \"\\n\"\n>     \"  git config --global push.default simple\\n\"\n>     \"\\n\"\n> -   \"When push.default is set to 'matching', git will push all local branches\\n\"\n> -   \"to the remote branches with the same (matching) name.  This will no\\n\"\n> -   \"longer be the default in Git 2.0 because a branch could be\\n\"\n> -   \"unintentionally pushed to a remote.\\n\"\n> +   \"When push.default is set to 'matching', git will push local branches\\n\"\n> +   \"to the remote branches that already exist with the same name.\\n\"\n>     \"\\n\"\n> -   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n> -   \"branch to the same remote branch used by git pull.   A push will\\n\"\n> -   \"only succeed if the remote and local branches have the same name.\\n\"\n> +   \"In Git 2.0, Git will default to the more conservative 'simple'\\n\"\n> +   \"behavior that only pushes the current branch to the corresponding\\n\"\n> +   \"remote branch used by 'git pull' to update the current branch from.\\n\"\n\nThat reads a bit awkwardly.  How about:\n\n\tIn Git 2.0, Git will default to the more conservative 'simple'\n\tbehavior, which only pushes the current branch to the corresponding\n\tremote branch that 'git pull' uses to update the current branch.\n\n\t\tM.\n"},{"id":"230398","messageId":"xmqqob5qna7b.fsf@gitster.dls.corp.google.com","threadId":"35065","inReplyTo":"527D6805.3050303@xiplink.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-11T17:02:16Z","receivedAt":"2013-11-11T17:02:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marc Branchaud <marcnarc@xiplink.com> writes:\n\n>> -   \"In Git 2.0 the new push.default of 'simple' will push only the current\\n\"\n>> -   \"branch to the same remote branch used by git pull.   A push will\\n\"\n>> -   \"only succeed if the remote and local branches have the same name.\\n\"\n>> +   \"In Git 2.0, Git will default to the more conservative 'simple'\\n\"\n>> +   \"behavior that only pushes the current branch to the corresponding\\n\"\n>> +   \"remote branch used by 'git pull' to update the current branch from.\\n\"\n>\n> That reads a bit awkwardly.  How about:\n>\n> \tIn Git 2.0, Git will default to the more conservative 'simple'\n> \tbehavior, which only pushes the current branch to the corresponding\n> \tremote branch that 'git pull' uses to update the current branch.\n\nOK, here is the version of Greg's patch (i.e. for versions before\n2.0) with the above.  The endgame patch for 2.0 would change the\nline that begins with \"In Git 2.0,\" to:\n\n\tSince Git 2.0, Git defaults to the more conservative ...\n\nIs everybody happy with this version?\n\n-- >8 --\nFrom: Greg Jacobson <coder5000@gmail.com>\nDate: Fri, 4 Oct 2013 10:20:07 -0400\nSubject: [PATCH] push: Enhance unspecified push default warning\n\nWhen the unset push.default warning message is displayed this may be\nthe first time many users encounter push.default.\n\nExplain in the warning message in a compact manner what push.default\nis and what the change means to the end-user to help the users decide.\n\nSigned-off-by: Greg Jacobson <coder5000@gmail.com>\nHelped-by: Jonathan Nieder <jrnieder@gmail.com>\nHelped-by: Matthieu Moy <Matthieu.Moy@imag.fr>\nHelped-by: Marc Branchaud <marcnarc@xiplink.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/push.c | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 7b1b66c..a73982a 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -174,6 +174,13 @@ N_(\"push.default is unset; its implicit value is changing in\\n\"\n    \"\\n\"\n    \"  git config --global push.default simple\\n\"\n    \"\\n\"\n+   \"When push.default is set to 'matching', git will push local branches\\n\"\n+   \"to the remote branches that already exist with the same name.\\n\"\n+   \"\\n\"\n+   \"In Git 2.0, Git will default to the more conservative 'simple'\\n\"\n+   \"behavior, which only pushes the current branch to the corresponding\\n\"\n+   \"remote branch that 'git pull' uses to update the current branch.\\n\"\n+   \"\\n\"\n    \"See 'git help config' and search for 'push.default' for further information.\\n\"\n    \"(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\\n\"\n    \"'current' instead of 'simple' if you sometimes use older versions of Git)\");\n-- \n1.8.5-rc1-310-g1febc12\n"},{"id":"230399","messageId":"20131111170343.GK10302@google.com","threadId":"35065","inReplyTo":"xmqqob5qna7b.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-11T17:03:43Z","receivedAt":"2013-11-11T17:03:43Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> Is everybody happy with this version?\n\nLooks good to me.\n\nThanks,\nJonathan\n"},{"id":"230400","messageId":"52811118.60306@xiplink.com","threadId":"35065","inReplyTo":"xmqqob5qna7b.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2013-11-11T17:17:12Z","receivedAt":"2013-11-11T17:17:12Z","isPatch":true,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"On 13-11-11 12:02 PM, Junio C Hamano wrote:\n> \n> Is everybody happy with this version?\n\nLooks good.\n\n\t\tM.\n"},{"id":"230439","messageId":"vpqhabiej70.fsf@anie.imag.fr","threadId":"35065","inReplyTo":"xmqqob5qna7b.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v3] push: Enhance unspecified push default warning","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-11-11T21:12:51Z","receivedAt":"2013-11-11T21:12:51Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Is everybody happy with this version?\n\nI am.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}