{"thread":{"id":"14743","subject":"[PATCH] Make it clear that push can take multiple refspecs","startedAt":"2008-07-29T20:09:19Z","lastAt":"2008-07-30T06:24:10Z","messageCount":8,"participants":["Abhijit Menon-Sen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"85512","messageId":"1217362159-25440-1-git-send-email-ams@toroid.org","threadId":"14743","inReplyTo":null,"subject":"[PATCH] Make it clear that push can take multiple refspecs","fromName":"Abhijit Menon-Sen","fromEmail":"ams@toroid.org","sentAt":"2008-07-29T20:09:19Z","receivedAt":"2008-07-29T20:09:19Z","isPatch":true,"sender":{"key":"ams@toroid.org","avatar":null},"body":"Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>\n---\n Documentation/git-push.txt |   10 ++++++++--\n 1 files changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 94d07ab..b8c55dd 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -10,7 +10,8 @@ SYNOPSIS\n --------\n [verse]\n 'git push' [--all] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]\n-           [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]\n+           [--repo=all] [-f | --force] [-v | --verbose]\n+           [<repository> <refspec>...]\n \n DESCRIPTION\n -----------\n@@ -33,7 +34,8 @@ OPTIONS\n \tThe canonical format of a <refspec> parameter is\n \t`+?<src>:<dst>`; that is, an optional plus `+`, followed\n \tby the source ref, followed by a colon `:`, followed by\n-\tthe destination ref.\n+\tthe destination ref. Any number of <refspec> parameters\n+\tmay be specified.\n +\n The <src> side represents the source branch (or arbitrary\n \"SHA1 expression\", such as `master~4` (four parents before the\n@@ -180,6 +182,10 @@ git push origin :experimental::\n \tFind a ref that matches `experimental` in the `origin` repository\n \t(e.g. `refs/heads/experimental`), and delete it.\n \n+git push origin master master:other::\n+\tFind a ref that matches `master` in the source repository and in\n+\tthe `origin` repository update refs `master` and `other` to it.\n+\n git push origin master:satellite/master::\n \tFind a ref that matches `master` in the source repository\n \t(most likely, it would find `refs/heads/master`), and update\n-- \n1.6.0.rc0.43.g2aa74\n"},{"id":"85515","messageId":"7vbq0gcsxg.fsf@gitster.siamese.dyndns.org","threadId":"14743","inReplyTo":"1217362159-25440-1-git-send-email-ams@toroid.org","subject":"Re: [PATCH] Make it clear that push can take multiple refspecs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-29T20:54:35Z","receivedAt":"2008-07-29T20:54:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Abhijit Menon-Sen <ams@toroid.org> writes:\n\n> Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>\n> ---\n>  Documentation/git-push.txt |   10 ++++++++--\n>  1 files changed, 8 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\n> index 94d07ab..b8c55dd 100644\n> --- a/Documentation/git-push.txt\n> +++ b/Documentation/git-push.txt\n> @@ -10,7 +10,8 @@ SYNOPSIS\n>  --------\n>  [verse]\n>  'git push' [--all] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]\n> -           [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]\n\nDoesn't this already say you can have zero or more refspecs?\n"},{"id":"85521","messageId":"20080729212808.GA27076@toroid.org","threadId":"14743","inReplyTo":"7vbq0gcsxg.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Make it clear that push can take multiple refspecs","fromName":"Abhijit Menon-Sen","fromEmail":"ams@toroid.org","sentAt":"2008-07-29T21:28:08Z","receivedAt":"2008-07-29T21:28:08Z","isPatch":true,"sender":{"key":"ams@toroid.org","avatar":null},"body":"At 2008-07-29 13:54:35 -0700, gitster@pobox.com wrote:\n>\n> Doesn't this already say you can have zero or more refspecs?\n\nIt does, of course, but I've seen more than one question about how to do\nit now, even from people who looked at the manpage, and it seemed to me\nthat adding an example wouldn't hurt.\n\n-- ams\n"},{"id":"85523","messageId":"7viquobb0e.fsf@gitster.siamese.dyndns.org","threadId":"14743","inReplyTo":"20080729212808.GA27076@toroid.org","subject":"Re: [PATCH] Make it clear that push can take multiple refspecs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-29T22:06:57Z","receivedAt":"2008-07-29T22:06:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Abhijit Menon-Sen <ams@toroid.org> writes:\n\n> At 2008-07-29 13:54:35 -0700, gitster@pobox.com wrote:\n>>\n>> Doesn't this already say you can have zero or more refspecs?\n>\n> It does, of course, but I've seen more than one question about how to do\n> it now, even from people who looked at the manpage, and it seemed to me\n> that adding an example wouldn't hurt.\n\nAdding an example would help to certain point, but beyond that certain\npoint it becomes unnecessary noise that talks the obvious.  If you saw the\nquestion asked many times in the real world, that would be a good\nindication that this patch falls into the \"helpful\" category, not \"noise\".\nWill queue.\n\nI wonder if there are other manual pages with <thing>... notation that\nbenefits from similar changes, though.\n\nThanks.\n"},{"id":"85535","messageId":"20080729231338.GA30717@toroid.org","threadId":"14743","inReplyTo":"7viquobb0e.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Make it clear that push can take multiple refspecs","fromName":"Abhijit Menon-Sen","fromEmail":"ams@toroid.org","sentAt":"2008-07-29T23:13:38Z","receivedAt":"2008-07-29T23:13:38Z","isPatch":true,"sender":{"key":"ams@toroid.org","avatar":null},"body":"At 2008-07-29 15:06:57 -0700, gitster@pobox.com wrote:\n>\n> If you saw the question asked many times in the real world, that\n> would be a good indication that this patch falls into the \"helpful\"\n> category, not \"noise\". Will queue.\n\nThanks.\n\nYou may find the appended patch less noisy still. I certainly like being\nable to get rid of the \"any number of...\" sentence; and I also think the\nexample is clearer, though I merged it into an existing one.\n\n(I would also change the '+?<src>:<dst>' to '[+]<src>:<dst>'. It's a bit\nweird to use BOTH regex format and SYNOPSIS format in the same string.)\n\n> I wonder if there are other manual pages with <thing>... notation that\n> benefits from similar changes, though.\n\nYes, I see now that there are several that could use minor changes.\nOften nothing more than the following is needed:\n\n-<committish>::\n-       The object name of the committish.\n+<committish>...::\n+       A list of committish object names to describe.\n\n(For git-describe, whose SYNOPSIS already mentions '<committish>...')\n\nI'll submit another patch for those later.\n\n-- ams\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 94d07ab..7f28ea6 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -10,7 +10,8 @@ SYNOPSIS\n --------\n [verse]\n 'git push' [--all] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]\n-           [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]\n+           [--repo=all] [-f | --force] [-v | --verbose]\n+           [<repository> <refspec>...]\n \n DESCRIPTION\n -----------\n@@ -29,8 +30,8 @@ OPTIONS\n \tThe \"remote\" repository that is destination of a push\n \toperation.  See the section <<URLS,GIT URLS>> below.\n \n-<refspec>::\n-\tThe canonical format of a <refspec> parameter is\n+<refspec>...::\n+\tThe canonical format of each <refspec> parameter is\n \t`+?<src>:<dst>`; that is, an optional plus `+`, followed\n \tby the source ref, followed by a colon `:`, followed by\n \tthe destination ref.\n@@ -180,11 +181,11 @@ git push origin :experimental::\n \tFind a ref that matches `experimental` in the `origin` repository\n \t(e.g. `refs/heads/experimental`), and delete it.\n \n-git push origin master:satellite/master::\n-\tFind a ref that matches `master` in the source repository\n-\t(most likely, it would find `refs/heads/master`), and update\n-\tthe ref that matches `satellite/master` (most likely, it would\n-\tbe `refs/remotes/satellite/master`) in `origin` repository with it.\n+git push origin master:satellite/master dev:satellite/dev::\n+\tUse the source ref that matches `master` (e.g. `refs/heads/master`)\n+\tto update the ref that matches `satellite/master` (most probably\n+\t`refs/remotes/satellite/master`) in the `origin` repository, then\n+\tdo the same for `dev` and `satellite/dev`.\n \n git push origin master:refs/heads/experimental::\n \tCreate the branch `experimental` in the `origin` repository\n"},{"id":"85541","messageId":"7vwsj49t27.fsf@gitster.siamese.dyndns.org","threadId":"14743","inReplyTo":"20080729231338.GA30717@toroid.org","subject":"Re: [PATCH] Make it clear that push can take multiple refspecs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-29T23:20:00Z","receivedAt":"2008-07-29T23:20:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Abhijit Menon-Sen <ams@toroid.org> writes:\n\n> At 2008-07-29 15:06:57 -0700, gitster@pobox.com wrote:\n>>\n>> If you saw the question asked many times in the real world, that\n>> would be a good indication that this patch falls into the \"helpful\"\n>> category, not \"noise\". Will queue.\n>\n> Thanks.\n>\n> You may find the appended patch less noisy still. I certainly like being\n> able to get rid of the \"any number of...\" sentence; and I also think the\n> example is clearer, though I merged it into an existing one.\n> ...\n> -<refspec>::\n> -\tThe canonical format of a <refspec> parameter is\n> +<refspec>...::\n> +\tThe canonical format of each <refspec> parameter is\n>  \t`+?<src>:<dst>`; that is, an optional plus `+`, followed\n\nAfter re-reading this, prompted by your comment about \"both synopsis\nsyntax and regex in the same sentence, I actually do not see a problem\nwith the original one.  The synopsis talks about the ability for you to\nspecify zero or more of whatever is called <refspec>, and here we define\nwhat _A_ refspec is.\n\nSomehow I thought the issue was that we said \"<refspec>...::\" in the\nheading of the description without saying zero-or-more, but that is not\nthe case here.\n"},{"id":"85585","messageId":"20080730061727.GA1912@toroid.org","threadId":"14743","inReplyTo":"7vwsj49t27.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Make it clear that push can take multiple refspecs","fromName":"Abhijit Menon-Sen","fromEmail":"ams@toroid.org","sentAt":"2008-07-30T06:17:27Z","receivedAt":"2008-07-30T06:17:27Z","isPatch":true,"sender":{"key":"ams@toroid.org","avatar":null},"body":"At 2008-07-29 16:20:00 -0700, gitster@pobox.com wrote:\n>\n> The synopsis talks about the ability for you to specify zero or more\n> of whatever is called <refspec>, and here we define what _A_ refspec\n> is.\n\nYes. The thing is, many places say \"<refspec>...\" both in the synopsis\nand in the description (e.g. add, am, apply, commit...), and doing it\ndifferently in some places seems more likely to be confusing than not.\n\nI think it's nice if items in the description exactly match something\nin the synopsis. It gives me more confidence that someone didn't just\nforget to update one or the other.\n\n(If you've queued the original git-push.txt patch, I'm happy to leave\nthe others alone, or change them one way or another, as you wish.)\n\n-- ams\n"},{"id":"85587","messageId":"7vhca799f9.fsf@gitster.siamese.dyndns.org","threadId":"14743","inReplyTo":"20080730061727.GA1912@toroid.org","subject":"Re: [PATCH] Make it clear that push can take multiple refspecs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-30T06:24:10Z","receivedAt":"2008-07-30T06:24:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Abhijit Menon-Sen <ams@toroid.org> writes:\n\n> I think it's nice if items in the description exactly match something\n> in the synopsis. It gives me more confidence that someone didn't just\n> forget to update one or the other.\n\nYup; queued.  Thanks.\n"}]}