{"thread":{"id":"18157","subject":"[RFC PATCH] git push: Push nothing if no refspecs are given or configured","startedAt":"2009-03-05T22:15:29Z","lastAt":"2009-03-09T21:10:33Z","messageCount":23,"participants":["Finn Arne Gangstad","Sverre Rabbelier","Markus Heidelberg","Junio C Hamano","Johannes Schindelin","John Tapsell","Jakub Narebski","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"107110","messageId":"20090305221529.GA25871@pvv.org","threadId":"18157","inReplyTo":null,"subject":"[RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Finn Arne Gangstad","fromEmail":"finnag@pvv.org","sentAt":"2009-03-05T22:15:29Z","receivedAt":"2009-03-05T22:15:29Z","isPatch":true,"sender":{"key":"finnag@pvv.org","avatar":"https://gravatar.com/avatar/b421ddd58c3f0f93aa473e17b98bb8d53c221fef741746bc8cb59fae4ec6d95e?d=mp&s=160"},"body":"Previously, git push [remote] with no arguments would behave like\n\"git push <remote> :\" if no push refspecs were configured for the remote.\nIt may be too easy for novice users to write \"git push\" or\n\"git push origin\" by accident, so git will now push nothing, and give an\nerror message in such cases.\n\nTeach git push a new option \"--matching\" that keeps the old behavior of\npushing all matching branches when none are configured.\n\nSigned-off-by: Finn Arne Gangstad <finnag@pvv.org>\n---\n Documentation/git-push.txt |   10 ++++++++--\n builtin-push.c             |   32 +++++++++++++++++++++++---------\n transport.h                |    1 +\n 3 files changed, 32 insertions(+), 11 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 4e7e5a7..77a4792 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -9,7 +9,7 @@ git-push - Update remote refs along with associated objects\n SYNOPSIS\n --------\n [verse]\n-'git push' [--all | --mirror | --tags] [--dry-run] [--receive-pack=<git-receive-pack>]\n+'git push' [--all | --mirror | --matching | --tags] [--dry-run] [--receive-pack=<git-receive-pack>]\n \t   [--repo=<repository>] [-f | --force] [-v | --verbose]\n \t   [<repository> <refspec>...]\n \n@@ -63,10 +63,11 @@ the remote repository.\n The special refspec `:` (or `{plus}:` to allow non-fast forward updates)\n directs git to push \"matching\" branches: for every branch that exists on\n the local side, the remote side is updated if a branch of the same name\n-already exists on the remote side.  This is the default operation mode\n+already exists on the remote side. Nothing will be pushed\n if no explicit refspec is found (that is neither on the command line\n nor in any Push line of the corresponding remotes file---see below).\n \n+\n --all::\n \tInstead of naming each ref to push, specifies that all\n \trefs under `$GIT_DIR/refs/heads/` be pushed.\n@@ -82,6 +83,11 @@ nor in any Push line of the corresponding remotes file---see below).\n \tif the configuration option `remote.<remote>.mirror` is\n \tset.\n \n+--matching::\n+\tIf no explicit refspecs are given, and no push refspecs are\n+\tconfigured for the remote, push all matching branches\n+\t(branches that exist in both ends) instead of nothing.\n+\n --dry-run::\n \tDo everything except actually send the updates.\n \ndiff --git a/builtin-push.c b/builtin-push.c\nindex 122fdcf..ffc648d 100644\n--- a/builtin-push.c\n+++ b/builtin-push.c\n@@ -10,7 +10,7 @@\n #include \"parse-options.h\"\n \n static const char * const push_usage[] = {\n-\t\"git push [--all | --mirror] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-v] [<repository> <refspec>...]\",\n+\t\"git push [--all | --mirror | --matching] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-v] [<repository> <refspec>...]\",\n \tNULL,\n };\n \n@@ -48,6 +48,12 @@ static void set_refspecs(const char **refs, int nr)\n \t}\n }\n \n+\n+static int has_multiple_bits(unsigned int x)\n+{\n+\treturn (x & (x - 1)) != 0;\n+}\n+\n static int do_push(const char *repo, int flags)\n {\n \tint i, errs;\n@@ -71,17 +77,24 @@ static int do_push(const char *repo, int flags)\n \t\treturn error(\"--mirror can't be combined with refspecs\");\n \t}\n \n-\tif ((flags & (TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) ==\n-\t\t\t\t(TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) {\n-\t\treturn error(\"--all and --mirror are incompatible\");\n+\tif (has_multiple_bits(flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR | TRANSPORT_PUSH_MATCHING))) {\n+\t\treturn error(\"--all, --mirror and --matching are incompatible\");\n \t}\n \n-\tif (!refspec\n-\t\t&& !(flags & TRANSPORT_PUSH_ALL)\n-\t\t&& remote->push_refspec_nr) {\n-\t\trefspec = remote->push_refspec;\n-\t\trefspec_nr = remote->push_refspec_nr;\n+\tif ((flags & TRANSPORT_PUSH_MATCHING)  && refspec) {\n+\t\treturn error(\"--matching cannot be combined with refspecs\");\n \t}\n+\n+\n+\tif (!refspec && !(flags & TRANSPORT_PUSH_ALL)) {\n+\t\tif (remote->push_refspec_nr) {\n+\t\t\trefspec = remote->push_refspec;\n+\t\t\trefspec_nr = remote->push_refspec_nr;\n+\t\t} else if (!(flags & TRANSPORT_PUSH_MATCHING)) {\n+\t\t\treturn error(\"No refspecs given and none configured for %s, nothing to push.\", remote->name);\n+\t\t}\n+\t}\n+\n \terrs = 0;\n \tfor (i = 0; i < remote->url_nr; i++) {\n \t\tstruct transport *transport =\n@@ -120,6 +133,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT( 0 , \"all\", &flags, \"push all refs\", TRANSPORT_PUSH_ALL),\n \t\tOPT_BIT( 0 , \"mirror\", &flags, \"mirror all refs\",\n \t\t\t    (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),\n+\t\tOPT_BIT( 0, \"matching\", &flags, \"push all matching refs\", TRANSPORT_PUSH_MATCHING),\n \t\tOPT_BOOLEAN( 0 , \"tags\", &tags, \"push tags\"),\n \t\tOPT_BIT( 0 , \"dry-run\", &flags, \"dry run\", TRANSPORT_PUSH_DRY_RUN),\n \t\tOPT_BIT('f', \"force\", &flags, \"force updates\", TRANSPORT_PUSH_FORCE),\ndiff --git a/transport.h b/transport.h\nindex 6bbc1a8..fb98128 100644\n--- a/transport.h\n+++ b/transport.h\n@@ -34,6 +34,7 @@ struct transport {\n #define TRANSPORT_PUSH_DRY_RUN 4\n #define TRANSPORT_PUSH_MIRROR 8\n #define TRANSPORT_PUSH_VERBOSE 16\n+#define TRANSPORT_PUSH_MATCHING 32\n \n /* Returns a transport suitable for the url */\n struct transport *transport_get(struct remote *, const char *);\n-- \n1.6.2.12.g83676.dirty\n"},{"id":"107111","messageId":"fabb9a1e0903051418k3fb6c8baqd0189c772893844e@mail.gmail.com","threadId":"18157","inReplyTo":"20090305221529.GA25871@pvv.org","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-03-05T22:18:59Z","receivedAt":"2009-03-05T22:18:59Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Thu, Mar 5, 2009 at 23:15, Finn Arne Gangstad <finnag@pvv.org> wrote:\n> Previously, git push [remote] with no arguments would behave like\n> \"git push <remote> :\" if no push refspecs were configured for the remote.\n> It may be too easy for novice users to write \"git push\" or\n> \"git push origin\" by accident, so git will now push nothing, and give an\n> error message in such cases.\n\nConfig option please, I very much like the current behavior.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"107112","messageId":"200903052322.02098.markus.heidelberg@web.de","threadId":"18157","inReplyTo":"fabb9a1e0903051418k3fb6c8baqd0189c772893844e@mail.gmail.com","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-03-05T22:22:01Z","receivedAt":"2009-03-05T22:22:01Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Sverre Rabbelier, 05.03.2009:\n> Heya,\n> \n> On Thu, Mar 5, 2009 at 23:15, Finn Arne Gangstad <finnag@pvv.org> wrote:\n> > Previously, git push [remote] with no arguments would behave like\n> > \"git push <remote> :\" if no push refspecs were configured for the remote.\n> > It may be too easy for novice users to write \"git push\" or\n> > \"git push origin\" by accident, so git will now push nothing, and give an\n> > error message in such cases.\n> \n> Config option please, I very much like the current behavior.\n\ngit push --nothing  ? :)\n\nMarkus\n"},{"id":"107114","messageId":"200903052325.44648.markus.heidelberg@web.de","threadId":"18157","inReplyTo":"200903052322.02098.markus.heidelberg@web.de","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-03-05T22:25:44Z","receivedAt":"2009-03-05T22:25:44Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Markus Heidelberg, 05.03.2009:\n> Sverre Rabbelier, 05.03.2009:\n> > Heya,\n> > \n> > On Thu, Mar 5, 2009 at 23:15, Finn Arne Gangstad <finnag@pvv.org> wrote:\n> > > Previously, git push [remote] with no arguments would behave like\n> > > \"git push <remote> :\" if no push refspecs were configured for the remote.\n> > > It may be too easy for novice users to write \"git push\" or\n> > > \"git push origin\" by accident, so git will now push nothing, and give an\n> > > error message in such cases.\n> > \n> > Config option please, I very much like the current behavior.\n> \n> git push --nothing  ? :)\n\nOh, I confused \"config option\" with \"command line argument\"...\n\nMarkus\n"},{"id":"107115","messageId":"fabb9a1e0903051426p1222f151s8f466abf319706da@mail.gmail.com","threadId":"18157","inReplyTo":"200903052325.44648.markus.heidelberg@web.de","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-03-05T22:26:21Z","receivedAt":"2009-03-05T22:26:21Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Thu, Mar 5, 2009 at 23:25, Markus Heidelberg\n<markus.heidelberg@web.de> wrote:\n> Oh, I confused \"config option\" with \"command line argument\"...\n\nRight, I'd like to be able to do:\n$ git config push.iamnotretarded true\n$ git push\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"107117","messageId":"7vmybzy4ii.fsf@gitster.siamese.dyndns.org","threadId":"18157","inReplyTo":"20090305221529.GA25871@pvv.org","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-05T22:43:49Z","receivedAt":"2009-03-05T22:43:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"If you want to pursue this, you at least need three patches, preferably\nfour:\n\n (1) Add a configuration option the existing users can use to ask for\n     \"with nothing else, please continue to default to matching refs\".\n\n     Add a logic to tell \"nothing is configured, hence we default to\n     matching refs\" and \"the user explicitly told us either via the\n     command line, or in the configuration file to use matching refs\"\n     cases.  Use the logic to issue a *warning* upon the former case that\n     tells the users the following, very loudly:\n\n     - \"default to push matching\" may be changed in a future version of\n       git to \"default to push nothing\";\n\n     - The user can squelch the warning by various ways:\n\n       - If you want to keep the \"matching refs\" behaviour, do $this...\n       - If you want to have $this behaviour, do $that...\n       - ...\n\n     Keep the default for the unconfigured case, after issuing the\n     warning, to the matching refs.\n\n (2) Add a deprecation notice to Documentation/RelNotes-1.6.3.txt similar\n     to the way denyCurrentBranch was announced in 1.6.2 release notes (I\n     need to carry that part forward to the draft release notes to 1.6.3).\n\n     Mention that these two patches are proposed to be applied immediately.\n\n (3) Flip the default for unconfigured case to \"nothing\".  Update the\n     warning message you wrote in (1) to explain that:\n\n     - The default used to be \"matching refs\", but it now is \"nothing\".\n       This message is given loudly because a silent change of default \n       is dangerous to users.\n\n     - The user can squelch the warning by doing ... (I expect the\n       instructions will stay the same as in (1)).\n\n     Mention that this patch is proposed to be applied in the next major\n     update (perhaps 1.7.0).\n\n (4) Remove the warning but keep the default to \"nothing\".  Mention that\n     this is to be applied long after (3).\n\nI won't comment on code quality other than hinting that you do not want to\nreinvent has_multiple_bits().\n"},{"id":"107176","messageId":"alpine.DEB.1.00.0903061124000.10279@pacific.mpi-cbg.de","threadId":"18157","inReplyTo":"fabb9a1e0903051426p1222f151s8f466abf319706da@mail.gmail.com","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-06T10:24:28Z","receivedAt":"2009-03-06T10:24:28Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n\n> On Thu, Mar 5, 2009 at 23:25, Markus Heidelberg\n> <markus.heidelberg@web.de> wrote:\n> > Oh, I confused \"config option\" with \"command line argument\"...\n> \n> Right, I'd like to be able to do:\n> $ git config push.iamnotretarded true\n> $ git push\n\nLOL!  Sverre, you have a way to crack me up...\n\nSnickering,\nDscho\n"},{"id":"107177","messageId":"7v4oy7szze.fsf@gitster.siamese.dyndns.org","threadId":"18157","inReplyTo":"alpine.DEB.1.00.0903061124000.10279@pacific.mpi-cbg.de","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-06T10:32:53Z","receivedAt":"2009-03-06T10:32:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n>\n>> On Thu, Mar 5, 2009 at 23:25, Markus Heidelberg\n>> <markus.heidelberg@web.de> wrote:\n>> > Oh, I confused \"config option\" with \"command line argument\"...\n>> \n>> Right, I'd like to be able to do:\n>> $ git config push.iamnotretarded true\n>> $ git push\n>\n> LOL!  Sverre, you have a way to crack me up...\n\nI found it amusing, too.\n\nIt may have some correlation with how well organized your work habit is,\nbut I do not think it has much correlation with being retarded.  It is\nmore about \"'matching refs' is the perfect default for _my_ use pattern,\ndon't mess with it, please\".\n"},{"id":"107178","messageId":"alpine.DEB.1.00.0903061126550.10279@pacific.mpi-cbg.de","threadId":"18157","inReplyTo":"20090305221529.GA25871@pvv.org","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-06T10:37:28Z","receivedAt":"2009-03-06T10:37:28Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nDisclaimer: if you are offended by constructive criticism, or likely to \nanswer with insults to the comments I offer, please stop reading this mail \nnow (and please do not answer my mail, either). :-)\n\nStill with me?  Good.  Nice to meet you.\n\nJust for the record: responding to a patch is my strongest way of saying \nthat I appreciate your work.\n\nOn Thu, 5 Mar 2009, Finn Arne Gangstad wrote:\n\n> Previously, git push [remote] with no arguments would behave like\n> \"git push <remote> :\" if no push refspecs were configured for the remote.\n> It may be too easy for novice users to write \"git push\" or\n> \"git push origin\" by accident, so git will now push nothing, and give an\n> error message in such cases.\n> \n> Teach git push a new option \"--matching\" that keeps the old behavior of\n> pushing all matching branches when none are configured.\n\nAs others have commented, you cannot just go and fsck existing users over.  \nThat is just not flying well.\n\nIMHO you should always consider the downsides of your patch in addition to \nthe upsides, and not only for yourself, but also for others.\n\n> @@ -63,10 +63,11 @@ the remote repository.\n>  The special refspec `:` (or `{plus}:` to allow non-fast forward updates)\n>  directs git to push \"matching\" branches: for every branch that exists on\n>  the local side, the remote side is updated if a branch of the same name\n> -already exists on the remote side.  This is the default operation mode\n> +already exists on the remote side. Nothing will be pushed\n\nThe two spaces after the full stop were not actually a typo.\n\n>  if no explicit refspec is found (that is neither on the command line\n>  nor in any Push line of the corresponding remotes file---see below).\n>  \n> +\n>  --all::\n\nPlease do not change the style of the surrounding text.  We do not have \ndouble empty lines there.\n\n> diff --git a/builtin-push.c b/builtin-push.c\n> index 122fdcf..ffc648d 100644\n> --- a/builtin-push.c\n> +++ b/builtin-push.c\n> @@ -48,6 +48,12 @@ static void set_refspecs(const char **refs, int nr)\n>  \t}\n>  }\n>  \n> +\n> +static int has_multiple_bits(unsigned int x)\n> +{\n> +\treturn (x & (x - 1)) != 0;\n> +}\n> +\n>  static int do_push(const char *repo, int flags)\n\nTo spare you searching: HAS_MULTI_BITS(x) (it is defined in \ngit-compat-util.h).\n\nAnd by removing your function, you also remove another double empty line.\n\n> @@ -71,17 +77,24 @@ static int do_push(const char *repo, int flags)\n>  \t\treturn error(\"--mirror can't be combined with refspecs\");\n>  \t}\n>  \n> -\tif ((flags & (TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) ==\n> -\t\t\t\t(TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) {\n> -\t\treturn error(\"--all and --mirror are incompatible\");\n> +\tif (has_multiple_bits(flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR | TRANSPORT_PUSH_MATCHING))) {\n> +\t\treturn error(\"--all, --mirror and --matching are incompatible\");\n\nThese are awfully long lines.  Not so good.\n\n>  \t}\n>  \n> -\tif (!refspec\n> -\t\t&& !(flags & TRANSPORT_PUSH_ALL)\n> -\t\t&& remote->push_refspec_nr) {\n> -\t\trefspec = remote->push_refspec;\n> -\t\trefspec_nr = remote->push_refspec_nr;\n> +\tif ((flags & TRANSPORT_PUSH_MATCHING)  && refspec) {\n> +\t\treturn error(\"--matching cannot be combined with refspecs\");\n>  \t}\n> +\n> +\n\nYet another double empty line.\n\n> +\tif (!refspec && !(flags & TRANSPORT_PUSH_ALL)) {\n> +\t\tif (remote->push_refspec_nr) {\n> +\t\t\trefspec = remote->push_refspec;\n> +\t\t\trefspec_nr = remote->push_refspec_nr;\n> +\t\t} else if (!(flags & TRANSPORT_PUSH_MATCHING)) {\n> +\t\t\treturn error(\"No refspecs given and none configured for %s, nothing to push.\", remote->name);\n> +\t\t}\n\nLong line and surplus curly brackets.\n\nJust to make it clear, because many people misunderstand my comments: I \nwould not have spent my precious time writing this email if I did not \nthink that --matching is something we want to have.\n\nCiao,\nDscho\n"},{"id":"107185","messageId":"fabb9a1e0903060317s6bb4644bvb4dbf0b9432ba58a@mail.gmail.com","threadId":"18157","inReplyTo":"7v4oy7szze.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-03-06T11:17:57Z","receivedAt":"2009-03-06T11:17:57Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Fri, Mar 6, 2009 at 11:32, Junio C Hamano <gitster@pobox.com> wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>> On Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n>>> Right, I'd like to be able to do:\n>>> $ git config push.iamnotretarded true\n>>> $ git push\n>>\n>> LOL!  Sverre, you have a way to crack me up...\n\nHehe, good, never hurts to add some humor to this list every now and then ;).\n\n> I found it amusing, too.\n\nI think that humor at times is an effective way to convey your point\nwhile and at the same time keeping the tone light :).\n\n> It may have some correlation with how well organized your work habit is,\n> but I do not think it has much correlation with being retarded.  It is\n> more about \"'matching refs' is the perfect default for _my_ use pattern,\n> don't mess with it, please\".\n\nFor me the reason 'git push' works well for me is that origin is\nrepo.or.cz and I use the repo there just to synch my changes between\nmy laptop and my pc (and to keep a backup). I reckon there are other\nworkflows for which it makes sense to use 'git push' directly :).\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"107188","messageId":"20090306114812.GA19534@pvv.org","threadId":"18157","inReplyTo":"7v4oy7szze.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Finn Arne Gangstad","fromEmail":"finnag@pvv.org","sentAt":"2009-03-06T11:48:12Z","receivedAt":"2009-03-06T11:48:12Z","isPatch":true,"sender":{"key":"finnag@pvv.org","avatar":"https://gravatar.com/avatar/b421ddd58c3f0f93aa473e17b98bb8d53c221fef741746bc8cb59fae4ec6d95e?d=mp&s=160"},"body":"On Fri, Mar 06, 2009 at 02:32:53AM -0800, Junio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n> >\n> >> On Thu, Mar 5, 2009 at 23:25, Markus Heidelberg\n> >> <markus.heidelberg@web.de> wrote:\n> >> > Oh, I confused \"config option\" with \"command line argument\"...\n> >> \n> >> Right, I'd like to be able to do:\n> >> $ git config push.iamnotretarded true\n> >> $ git push\n> >\n> > LOL!  Sverre, you have a way to crack me up...\n> \n> I found it amusing, too.\n> \n> It may have some correlation with how well organized your work habit is,\n> but I do not think it has much correlation with being retarded.  It is\n> more about \"'matching refs' is the perfect default for _my_ use pattern,\n> don't mess with it, please\".\n\nSo here is my current WIP suggestion for a new \"push.default\"\nvariable, I am not sure if a single entry can express all useful\nchoices, or if it is a good idea to introduce more default choices\nother than \"nothing\" (with the goal of making it the default in a\nlater release).\n\nI think all the values here make sense as a --option to git push\nthough (except --nothing...)\n\nSuggested new entry in config.txt:\n\npush.default::\n\tDefines the action git push should take if no refspec is given\n\ton the command line, no refspec is configured in the branch, and\n\tno refspec is implied by any of the options given on the command\n\tline.\n+\n\tThe term `current remote` means the remote configured for the current\n\tbranch, or `origin` if no remote is set. `origin` is also used if\n\tyou are not on a branch at all.\n+\n* `nothing` do not push anything\n* `matching` push all matching branches to the current remote.\n  All branches having the same name in both ends are considered to be\n  matching. This is the default value.\n* `same-remote` push all matching branches that are configured to use\n  the current remote. Branches with no remote configuration are not pushed.\n* `tracked` push all branches that are tracking a branch on the current\n  remote to their counterpart.\n\n\n- Finn Arne\n"},{"id":"107190","messageId":"alpine.DEB.1.00.0903061306450.10279@pacific.mpi-cbg.de","threadId":"18157","inReplyTo":"20090306114812.GA19534@pvv.org","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-06T12:07:56Z","receivedAt":"2009-03-06T12:07:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 6 Mar 2009, Finn Arne Gangstad wrote:\n\n> On Fri, Mar 06, 2009 at 02:32:53AM -0800, Junio C Hamano wrote:\n> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> > \n> > > On Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n> > >\n> > >> On Thu, Mar 5, 2009 at 23:25, Markus Heidelberg\n> > >> <markus.heidelberg@web.de> wrote:\n> > >> > Oh, I confused \"config option\" with \"command line argument\"...\n> > >> \n> > >> Right, I'd like to be able to do:\n> > >> $ git config push.iamnotretarded true\n> > >> $ git push\n> > >\n> > > LOL!  Sverre, you have a way to crack me up...\n> > \n> > I found it amusing, too.\n> > \n> > It may have some correlation with how well organized your work habit is,\n> > but I do not think it has much correlation with being retarded.  It is\n> > more about \"'matching refs' is the perfect default for _my_ use pattern,\n> > don't mess with it, please\".\n> \n> So here is my current WIP suggestion for a new \"push.default\"\n> variable, I am not sure if a single entry can express all useful\n> choices, or if it is a good idea to introduce more default choices\n> other than \"nothing\" (with the goal of making it the default in a\n> later release).\n\nSpeaking of which, Steffen (who cannot reply right now, since he is AFK \nfor a while) had a patch to install \"remote.<branch>.push = HEAD\" with \nclone and remote.  Would that be better?\n\nCiao,\nDscho\n"},{"id":"107194","messageId":"43d8ce650903060426y776474fi10acc5495b88fa7@mail.gmail.com","threadId":"18157","inReplyTo":"20090306114812.GA19534@pvv.org","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"John Tapsell","fromEmail":"johnflux@gmail.com","sentAt":"2009-03-06T12:26:59Z","receivedAt":"2009-03-06T12:26:59Z","isPatch":true,"sender":{"key":"johnflux@gmail.com","avatar":"https://gravatar.com/avatar/25f70d4c0f96396b84a2e34bcd9bdc233462c7b4be29b5fdca8266fc53f30b0c?d=mp&s=160"},"body":"2009/3/6 Finn Arne Gangstad <finnag@pvv.org>:\n> On Fri, Mar 06, 2009 at 02:32:53AM -0800, Junio C Hamano wrote:\n>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>>\n>> > On Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n>> >\n>> >> On Thu, Mar 5, 2009 at 23:25, Markus Heidelberg\n>> >> <markus.heidelberg@web.de> wrote:\n>> >> > Oh, I confused \"config option\" with \"command line argument\"...\n>> >>\n>> >> Right, I'd like to be able to do:\n>> >> $ git config push.iamnotretarded true\n>> >> $ git push\n>> >\n>> > LOL!  Sverre, you have a way to crack me up...\n>>\n>> I found it amusing, too.\n>>\n>> It may have some correlation with how well organized your work habit is,\n>> but I do not think it has much correlation with being retarded.  It is\n>> more about \"'matching refs' is the perfect default for _my_ use pattern,\n>> don't mess with it, please\".\n>\n> So here is my current WIP suggestion for a new \"push.default\"\n> variable, I am not sure if a single entry can express all useful\n> choices, or if it is a good idea to introduce more default choices\n> other than \"nothing\" (with the goal of making it the default in a\n> later release).\n>\n> I think all the values here make sense as a --option to git push\n> though (except --nothing...)\n>\n> Suggested new entry in config.txt:\n>\n> push.default::\n>        Defines the action git push should take if no refspec is given\n>        on the command line, no refspec is configured in the branch, and\n>        no refspec is implied by any of the options given on the command\n>        line.\n> +\n>        The term `current remote` means the remote configured for the current\n>        branch, or `origin` if no remote is set. `origin` is also used if\n>        you are not on a branch at all.\n> +\n> * `nothing` do not push anything\n> * `matching` push all matching branches to the current remote.\n>  All branches having the same name in both ends are considered to be\n>  matching. This is the default value.\n> * `same-remote` push all matching branches that are configured to use\n>  the current remote. Branches with no remote configuration are not pushed.\n> * `tracked` push all branches that are tracking a branch on the current\n>  remote to their counterpart.\n\nHow about 'current', to simply push the current the branch.  It could\neven prompt if it's not tracked yet.\n\nMost (all?) other revision control systems have this 'current'\nbehaviour by default.\n\nJohn\n"},{"id":"107199","messageId":"20090306135840.GA24454@pvv.org","threadId":"18157","inReplyTo":"alpine.DEB.1.00.0903061306450.10279@pacific.mpi-cbg.de","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Finn Arne Gangstad","fromEmail":"finnag@pvv.org","sentAt":"2009-03-06T13:58:40Z","receivedAt":"2009-03-06T13:58:40Z","isPatch":true,"sender":{"key":"finnag@pvv.org","avatar":"https://gravatar.com/avatar/b421ddd58c3f0f93aa473e17b98bb8d53c221fef741746bc8cb59fae4ec6d95e?d=mp&s=160"},"body":"On Fri, Mar 06, 2009 at 01:07:56PM +0100, Johannes Schindelin wrote:\n> [...]\n> \n> Speaking of which, Steffen (who cannot reply right now, since he is AFK \n> for a while) had a patch to install \"remote.<branch>.push = HEAD\" with \n> clone and remote.  Would that be better?\n\nAre you referring to the patch he suggested in October 2007? I'm\nreading the October/November archives now, and it seems these things\nhave been discussed before... Ok so re-reading the discussion from\nOctober/November 2007, it seems that we are having exactly the same\ndiscussion again! I did not investigate far enough back in time before\nfiring up this thread again evidently.\n\nReading the threads almost makes me sad. Steffen had a lot of great\npatches and ideas (implementing --current, adding tests, ...), but it\nwas somehow dropped. After having read through this it would feel\nwrong somehow to even post patches on this topic, since I would\neffectively just redo what he already did.\n\nThe only difference between his approach and what I am suggesting\nseems to be that he mostly wanted \"git push\" to do various useful\ntasks depending on configuration (the remote.<branch>.push stuff),\nwhile I mostly want \"git push\" to do nothing by default. We both agree\nthat the current \"git push\" default behavior is very bad for our\nworkflow (many developers against one or more shared repos).\n\n- Finn Arne\n"},{"id":"107206","messageId":"m3r61aisdo.fsf@localhost.localdomain","threadId":"18157","inReplyTo":"alpine.DEB.1.00.0903061306450.10279@pacific.mpi-cbg.de","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-03-06T15:25:26Z","receivedAt":"2009-03-06T15:25:26Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> On Fri, 6 Mar 2009, Finn Arne Gangstad wrote:\n>> On Fri, Mar 06, 2009 at 02:32:53AM -0800, Junio C Hamano wrote:\n>>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>>>> On Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n>>>>> \n>>>>> Right, I'd like to be able to do:\n>>>>> $ git config push.iamnotretarded true\n>>>>> $ git push\n>>>>\n>>>> LOL!  Sverre, you have a way to crack me up...\n>>> \n>>> I found it amusing, too.\n>>> \n>>> It may have some correlation with how well organized your work habit is,\n>>> but I do not think it has much correlation with being retarded.  It is\n>>> more about \"'matching refs' is the perfect default for _my_ use pattern,\n>>> don't mess with it, please\".\n>> \n>> So here is my current WIP suggestion for a new \"push.default\"\n>> variable, I am not sure if a single entry can express all useful\n>> choices, or if it is a good idea to introduce more default choices\n>> other than \"nothing\" (with the goal of making it the default in a\n>> later release).\n> \n> Speaking of which, Steffen (who cannot reply right now, since he is AFK \n> for a while) had a patch to install \"remote.<branch>.push = HEAD\" with \n> clone and remote.  Would that be better?\n\nErrr... I thought that \"remote.<remotename>.push = HEAD\" works?\n\nBut note that \"remote.<name>.push = HEAD\" (push current branch only)\nand \"remote.<name>.push = :\" (push matching branches, i.e. curent\nbehavior) works only if you have remote configured... \"git push <URL>\"\nwon't be affected, and people (probably) would want to either have\n'nothing' as default, or/and be able to configure it to nothing,\ncurrent, or matching (at least).\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"107209","messageId":"m3mybyisa1.fsf@localhost.localdomain","threadId":"18157","inReplyTo":"43d8ce650903060426y776474fi10acc5495b88fa7@mail.gmail.com","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-03-06T15:27:35Z","receivedAt":"2009-03-06T15:27:35Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"John Tapsell <johnflux@gmail.com> writes:\n> 2009/3/6 Finn Arne Gangstad <finnag@pvv.org>:\n>> On Fri, Mar 06, 2009 at 02:32:53AM -0800, Junio C Hamano wrote:\n>>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>>>\n>>>> On Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n>>>>\n>>>>> On Thu, Mar 5, 2009 at 23:25, Markus Heidelberg\n>>>>> <markus.heidelberg@web.de> wrote:\n>>>>>> Oh, I confused \"config option\" with \"command line argument\"...\n>>>>>\n>>>>> Right, I'd like to be able to do:\n>>>>> $ git config push.iamnotretarded true\n>>>>> $ git push\n>>>>\n>>>> LOL!  Sverre, you have a way to crack me up...\n>>>\n>>> I found it amusing, too.\n>>>\n>>> It may have some correlation with how well organized your work habit is,\n>>> but I do not think it has much correlation with being retarded.  It is\n>>> more about \"'matching refs' is the perfect default for _my_ use pattern,\n>>> don't mess with it, please\".\n>>\n>> So here is my current WIP suggestion for a new \"push.default\"\n>> variable, I am not sure if a single entry can express all useful\n>> choices, or if it is a good idea to introduce more default choices\n>> other than \"nothing\" (with the goal of making it the default in a\n>> later release).\n>>\n>> I think all the values here make sense as a --option to git push\n>> though (except --nothing...)\n>>\n>> Suggested new entry in config.txt:\n>>\n>> push.default::\n>>        Defines the action git push should take if no refspec is given\n>>        on the command line, no refspec is configured in the branch, and\n>>        no refspec is implied by any of the options given on the command\n>>        line.\n>> +\n>>        The term `current remote` means the remote configured for the current\n>>        branch, or `origin` if no remote is set. `origin` is also used if\n>>        you are not on a branch at all.\n>> +\n>> * `nothing` do not push anything\n>> * `matching` push all matching branches to the current remote.\n>>  All branches having the same name in both ends are considered to be\n>>  matching. This is the default value.\n>> * `same-remote` push all matching branches that are configured to use\n>>  the current remote. Branches with no remote configuration are not pushed.\n>> * `tracked` push all branches that are tracking a branch on the current\n>>  remote to their counterpart.\n> \n> How about 'current', to simply push the current the branch.  It could\n> even prompt if it's not tracked yet.\n\nNote that if you have configuration for <remote>, you can simply add\n\"remote.<remote>.push = HEAD\" for pushing current branch only, and\n\"remote.<remote>.push = :\" for current matching behavior.  Perhaps\n\"remote.<remote>.push = \" works for push nothing?\n \n> Most (all?) other revision control systems have this 'current'\n> behaviour by default.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"107231","messageId":"7vr61ash8o.fsf@gitster.siamese.dyndns.org","threadId":"18157","inReplyTo":"m3r61aisdo.fsf@localhost.localdomain","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-06T17:17:43Z","receivedAt":"2009-03-06T17:17:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> ...\n>> Speaking of which, Steffen (who cannot reply right now, since he is AFK \n>> for a while) had a patch to install \"remote.<branch>.push = HEAD\" with \n>> clone and remote.  Would that be better?\n>\n> Errr... I thought that \"remote.<remotename>.push = HEAD\" works?\n>\n> But note that \"remote.<name>.push = HEAD\" (push current branch only)\n> and \"remote.<name>.push = :\" (push matching branches, i.e. curent\n> behavior) works only if you have remote configured... \"git push <URL>\"\n> won't be affected, and people (probably) would want to either have\n> 'nothing' as default, or/and be able to configure it to nothing,\n> current, or matching (at least).\n\nWhen you and Dscho contradict with each other, I seem to end up agreeing\nwith Dscho most of the time, but for this particular one, I completely\nagree with you.\n\nI personally think Finn's suggested list is overengineered, and we should\nstart with only three: \"nothing\", \"current\" (aka HEAD), and \"matching\".\nIt is Ok to have a separate discussion to figure out what other default\nbehaviours are desireable, but I think that should come after the dust\nsettled from the transition, and more importantly, I think the other kinds\nof fine-tuned behaviour needs to be per-remote, and is not something the\nrepository (or user) wide default push.default can cover.\n\nIn addition to your counterargument, clone to set up remote.*.push is\nintroducing an inconsistency between existing and new repositories until\nthe default is changed for everybody, and the recent trend is to avoid\nthat kind of inconsistency.  Steffen's patch _could_ use push.default to\ninfer what kind of remote.*.push to set up when adding a remote (or when\ncloning, if you take push.default from $HOME/.gitconfig), but at that\npoint it becomes a redundant information.\n"},{"id":"107252","messageId":"alpine.DEB.1.00.0903062359490.10279@pacific.mpi-cbg.de","threadId":"18157","inReplyTo":"m3r61aisdo.fsf@localhost.localdomain","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-06T23:00:20Z","receivedAt":"2009-03-06T23:00:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 6 Mar 2009, Jakub Narebski wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> > On Fri, 6 Mar 2009, Finn Arne Gangstad wrote:\n> >> On Fri, Mar 06, 2009 at 02:32:53AM -0800, Junio C Hamano wrote:\n> >>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> >>>> On Thu, 5 Mar 2009, Sverre Rabbelier wrote:\n> >>>>> \n> >>>>> Right, I'd like to be able to do:\n> >>>>> $ git config push.iamnotretarded true\n> >>>>> $ git push\n> >>>>\n> >>>> LOL!  Sverre, you have a way to crack me up...\n> >>> \n> >>> I found it amusing, too.\n> >>> \n> >>> It may have some correlation with how well organized your work habit is,\n> >>> but I do not think it has much correlation with being retarded.  It is\n> >>> more about \"'matching refs' is the perfect default for _my_ use pattern,\n> >>> don't mess with it, please\".\n> >> \n> >> So here is my current WIP suggestion for a new \"push.default\"\n> >> variable, I am not sure if a single entry can express all useful\n> >> choices, or if it is a good idea to introduce more default choices\n> >> other than \"nothing\" (with the goal of making it the default in a\n> >> later release).\n> > \n> > Speaking of which, Steffen (who cannot reply right now, since he is AFK \n> > for a while) had a patch to install \"remote.<branch>.push = HEAD\" with \n> > clone and remote.  Would that be better?\n> \n> Errr... I thought that \"remote.<remotename>.push = HEAD\" works?\n> \n> But note that \"remote.<name>.push = HEAD\" (push current branch only)\n> and \"remote.<name>.push = :\" (push matching branches, i.e. curent\n> behavior) works only if you have remote configured... \"git push <URL>\"\n> won't be affected, and people (probably) would want to either have\n> 'nothing' as default, or/and be able to configure it to nothing,\n> current, or matching (at least).\n\nThe question was not if remote.<remote>.push = HEAD works, but if it is \ninstalled by default.\n\nCiao,\nDscho\n"},{"id":"107264","messageId":"alpine.DEB.1.00.0903070256540.10279@pacific.mpi-cbg.de","threadId":"18157","inReplyTo":"7vr61ash8o.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-07T02:06:03Z","receivedAt":"2009-03-07T02:06:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 6 Mar 2009, Junio C Hamano wrote:\n\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> > ...\n> >> Speaking of which, Steffen (who cannot reply right now, since he is \n> >> AFK for a while) had a patch to install \"remote.<branch>.push = HEAD\" \n> >> with clone and remote.  Would that be better?\n> >\n> > Errr... I thought that \"remote.<remotename>.push = HEAD\" works?\n> >\n> > But note that \"remote.<name>.push = HEAD\" (push current branch only) \n> > and \"remote.<name>.push = :\" (push matching branches, i.e. curent \n> > behavior) works only if you have remote configured... \"git push <URL>\" \n> > won't be affected, and people (probably) would want to either have \n> > 'nothing' as default, or/and be able to configure it to nothing, \n> > current, or matching (at least).\n> \n> When you and Dscho contradict with each other, I seem to end up agreeing \n> with Dscho most of the time, but for this particular one, I completely \n> agree with you.\n\nA word of caution.  Quite a few people (or at least a few people who write \nloud-enough emails) do not like me.  So even if you agree with my \nreasoning, you might want to point out that you are not agreeing with \n\"Dscho\", but rather mention that you happened to agree with a particular \nline of argument.\n\nCertain people might mistake your being convinced by arguments for pure \npolitics otherwise.\n\n> I personally think Finn's suggested list is overengineered, and we \n> should start with only three: \"nothing\", \"current\" (aka HEAD), and \n> \"matching\". It is Ok to have a separate discussion to figure out what \n> other default behaviours are desireable, but I think that should come \n> after the dust settled from the transition, and more importantly, I \n> think the other kinds of fine-tuned behaviour needs to be per-remote, \n> and is not something the repository (or user) wide default push.default \n> can cover.\n\nAs long as the default does not change without warning, I am sure we are \nsafe there.\n\nMe mentioning Steffen's patch was more meant to kickstart people who \nmissed the discussion into the intricacies, not to say that one or the \nother default makes most sense.\n\nPersonally, I am torn between the current default, which appears massively \nreasonable to me (probably due to being exposed to Git for quite some \ntime), but I can also see why Steffen's approach appeals to some people.\n\nCiao,\nDscho\n"},{"id":"107499","messageId":"200903092139.35788.markus.heidelberg@web.de","threadId":"18157","inReplyTo":"alpine.DEB.1.00.0903061126550.10279@pacific.mpi-cbg.de","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-03-09T20:39:34Z","receivedAt":"2009-03-09T20:39:34Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Johannes Schindelin, 06.03.2009:\n> > -already exists on the remote side.  This is the default operation mode\n> > +already exists on the remote side. Nothing will be pushed\n> \n> The two spaces after the full stop were not actually a typo.\n\nWhat's its purpose? Just recently I added \"set nojoinspaces\" to my\n.vimrc to not insert two spaces when joining sentences.\n\nMarkus\n"},{"id":"107500","messageId":"alpine.DEB.1.00.0903092148040.6358@intel-tinevez-2-302","threadId":"18157","inReplyTo":"200903092139.35788.markus.heidelberg@web.de","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-09T20:48:31Z","receivedAt":"2009-03-09T20:48:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 9 Mar 2009, Markus Heidelberg wrote:\n\n> Johannes Schindelin, 06.03.2009:\n> > > -already exists on the remote side.  This is the default operation mode\n> > > +already exists on the remote side. Nothing will be pushed\n> > \n> > The two spaces after the full stop were not actually a typo.\n> \n> What's its purpose? Just recently I added \"set nojoinspaces\" to my\n> .vimrc to not insert two spaces when joining sentences.\n\nIt was explained to me as \"English grammar\".  Two spaces after a full \nstop.\n\nCiao,\nDscho\n"},{"id":"107504","messageId":"200903092210.27417.markus.heidelberg@web.de","threadId":"18157","inReplyTo":"alpine.DEB.1.00.0903092148040.6358@intel-tinevez-2-302","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-03-09T21:10:26Z","receivedAt":"2009-03-09T21:10:26Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Johannes Schindelin, 09.03.2009:\n> Hi,\n> \n> On Mon, 9 Mar 2009, Markus Heidelberg wrote:\n> \n> > Johannes Schindelin, 06.03.2009:\n> > > > -already exists on the remote side.  This is the default operation mode\n> > > > +already exists on the remote side. Nothing will be pushed\n> > > \n> > > The two spaces after the full stop were not actually a typo.\n> > \n> > What's its purpose? Just recently I added \"set nojoinspaces\" to my\n> > .vimrc to not insert two spaces when joining sentences.\n> \n> It was explained to me as \"English grammar\".  Two spaces after a full \n> stop.\n\nI should have tried searching, I didn't think I'd get useful results\nwith \"two spaces after sentence\" as search item, but I did.\n\nhttp://en.wikipedia.org/wiki/Full_stop#Spacing_after_full_stop\n\nTwo spaces between sentences.  But no space between\ntext and the dash---strange.\n\nMarkus\n"},{"id":"107505","messageId":"20090309211033.GA5989@coredump.intra.peff.net","threadId":"18157","inReplyTo":"alpine.DEB.1.00.0903092148040.6358@intel-tinevez-2-302","subject":"Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-09T21:10:33Z","receivedAt":"2009-03-09T21:10:33Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Mar 09, 2009 at 09:48:31PM +0100, Johannes Schindelin wrote:\n\n> > > The two spaces after the full stop were not actually a typo.\n> > \n> > What's its purpose? Just recently I added \"set nojoinspaces\" to my\n> > .vimrc to not insert two spaces when joining sentences.\n> \n> It was explained to me as \"English grammar\".  Two spaces after a full \n> stop.\n\nIt's not grammar, but rather a typographical convention dating to\nmonospaced print fonts. It's mostly outdated these days for computer\ninput, as markup languages will put in the \"right\" amount of space\nautomatically (e.g., one and two spaces after a period are equivalent in\nboth TeX and HTML) and proportional fonts and justification mean your\nspacing isn't standard, anyway. So as a rule, it seems to be dying out.\nYou can google \"two spaces after period\" to see the ensuing flamewars.\n\nIn this particular instance, we consider the pre-markup version\nsomething readable (since that is the point of asciidoc), and people\nwill tend to view it in a monospaced fonts. So it at least makes a\ndifference here (and you can then have a flamewar about how it looks).\n\n-Peff\n"}]}