{"thread":{"id":"13193","subject":"[PATCH] Amend git-push refspec documentation","startedAt":"2008-04-21T03:31:24Z","lastAt":"2008-04-22T08:27:13Z","messageCount":3,"participants":["Sam Vilain","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"74858","messageId":"1208748684-28253-1-git-send-email-sam.vilain@catalyst.net.nz","threadId":"13193","inReplyTo":null,"subject":"[PATCH] Amend git-push refspec documentation","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2008-04-21T03:31:24Z","receivedAt":"2008-04-21T03:31:24Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"These paragraphs are a little confusing.  Also, make it clearer when\nyou have to specify the full name for <dst>\n\nSigned-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>\n---\n Documentation/git-push.txt |   22 ++++++++++++----------\n 1 files changed, 12 insertions(+), 10 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 3128170..b3d164e 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -35,14 +35,14 @@ OPTIONS\n \tby the source ref, followed by a colon `:`, followed by\n \tthe destination ref.\n +\n-The <src> side can be an\n-arbitrary \"SHA1 expression\" that can be used as an\n-argument to `git-cat-file -t`.  E.g. `master~4` (push\n-four parents before the current master head).\n+The <src> side represents the source branch (or arbitrary\n+\"SHA1 expression\"; see linkgit:git-rev-parse[1]) that you want to\n+push.  The <dst> side represents the destination location.\n +\n The local ref that matches <src> is used\n-to fast forward the remote ref that matches <dst>.  If\n-the optional plus `+` is used, the remote ref is updated\n+to fast forward the remote ref that matches <dst> (or, if no <dst> was\n+specified, the same ref that <src> referred to locally).  If\n+the optional leading plus `+` is used, the remote ref is updated\n even if it does not result in a fast forward update.\n +\n Note: If no explicit refspec is found, (that is neither\n@@ -165,7 +165,8 @@ git push origin 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 same ref (e.g. `refs/heads/master`) in `origin` repository\n-\twith it.\n+\twith it.  If `master` did not exist remotely, it would be\n+\tcreated.\n \n git push origin :experimental::\n \tFind a ref that matches `experimental` in the `origin` repository\n@@ -179,9 +180,10 @@ git push origin master:satellite/master::\n \n git push origin master:refs/heads/experimental::\n \tCreate the branch `experimental` in the `origin` repository\n-\tby copying the current `master` branch.  This form is usually\n-\tneeded to create a new branch in the remote repository as\n-\tthere is no `experimental` branch to match.\n+\tby copying the current `master` branch.  This form is only\n+\tneeded to create a new branch in the remote repository when\n+\tthe local name and the remote name are different; otherwise,\n+\tthe branch name on its own will work.\n \n Author\n ------\n-- \n1.5.5.1.50.g1d36.dirty\n"},{"id":"74907","messageId":"7vk5iq5tj2.fsf@gitster.siamese.dyndns.org","threadId":"13193","inReplyTo":"1208748684-28253-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"Re: [PATCH] Amend git-push refspec documentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-22T05:48:49Z","receivedAt":"2008-04-22T05:48:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sam Vilain <sam.vilain@catalyst.net.nz> writes:\n\n> These paragraphs are a little confusing.  Also, make it clearer when\n> you have to specify the full name for <dst>\n>\n> Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>\n> ---\n>  Documentation/git-push.txt |   22 ++++++++++++----------\n>  1 files changed, 12 insertions(+), 10 deletions(-)\n>\n> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\n> index 3128170..b3d164e 100644\n> --- a/Documentation/git-push.txt\n> +++ b/Documentation/git-push.txt\n> @@ -35,14 +35,14 @@ OPTIONS\n>  \tby the source ref, followed by a colon `:`, followed by\n>  \tthe destination ref.\n>  +\n> -The <src> side can be an\n> -arbitrary \"SHA1 expression\" that can be used as an\n> -argument to `git-cat-file -t`.  E.g. `master~4` (push\n> -four parents before the current master head).\n> +The <src> side represents the source branch (or arbitrary\n> +\"SHA1 expression\"; see linkgit:git-rev-parse[1]) that you want to\n> +push.  The <dst> side represents the destination location.\n>  +\n\nHmm.  We lost an example but refer to a more authoritative information,\nwhich is probably Ok.\n\n>  The local ref that matches <src> is used\n> -to fast forward the remote ref that matches <dst>.  If\n> -the optional plus `+` is used, the remote ref is updated\n> +to fast forward the remote ref that matches <dst> (or, if no <dst> was\n> +specified, the same ref that <src> referred to locally).  If\n> +the optional leading plus `+` is used, the remote ref is updated\n>  even if it does not result in a fast forward update.\n>  +\n\nThat's an improvement.\n\n> @@ -179,9 +180,10 @@ git push origin master:satellite/master::\n>  \n>  git push origin master:refs/heads/experimental::\n>  \tCreate the branch `experimental` in the `origin` repository\n> -\tby copying the current `master` branch.  This form is usually\n> -\tneeded to create a new branch in the remote repository as\n> -\tthere is no `experimental` branch to match.\n> +\tby copying the current `master` branch.  This form is only\n> +\tneeded to create a new branch in the remote repository when\n> +\tthe local name and the remote name are different; otherwise,\n> +\tthe branch name on its own will work.\n\nNote that writing \"refs/tags/xprm\" instead would allow you to create a\nlightweight tag over there.\n"},{"id":"74926","messageId":"480DA161.3070107@catalyst.net.nz","threadId":"13193","inReplyTo":"7vk5iq5tj2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Amend git-push refspec documentation","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2008-04-22T08:27:13Z","receivedAt":"2008-04-22T08:27:13Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Junio C Hamano wrote:\n>> -The <src> side can be an\n>> -arbitrary \"SHA1 expression\" that can be used as an\n>> -argument to `git-cat-file -t`.  E.g. `master~4` (push\n>> -four parents before the current master head).\n>> +The <src> side represents the source branch (or arbitrary\n>> +\"SHA1 expression\"; see linkgit:git-rev-parse[1]) that you want to\n>> +push.  The <dst> side represents the destination location.\n>>  +\n> \n> Hmm.  We lost an example but refer to a more authoritative information,\n> which is probably Ok.\n\nWell, the example I think was quite confusing to people who have never\nseen `master~4` before.\n\n>> @@ -179,9 +180,10 @@ git push origin master:satellite/master::\n>>  \n>>  git push origin master:refs/heads/experimental::\n>>  \tCreate the branch `experimental` in the `origin` repository\n>> -\tby copying the current `master` branch.  This form is usually\n>> -\tneeded to create a new branch in the remote repository as\n>> -\tthere is no `experimental` branch to match.\n>> +\tby copying the current `master` branch.  This form is only\n>> +\tneeded to create a new branch in the remote repository when\n>> +\tthe local name and the remote name are different; otherwise,\n>> +\tthe branch name on its own will work.\n> \n> Note that writing \"refs/tags/xprm\" instead would allow you to create a\n> lightweight tag over there.\n\nTrue.  You could probably replace 'branch' with 'ref' in the two places\nit occurs in the last sentence to encompass that meaning, too.\n\nCheers,\nSam.\n"}]}