git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH] doc: attempt to clarify a blurry sentence.
@ 2021-05-06 16:37 Lars Berntzon via GitGitGadget
  2021-05-06 22:03 ` Junio C Hamano
  2021-05-07  8:35 ` Lars Berntzon
  0 siblings, 2 replies; 3+ messages in thread
From: Lars Berntzon via GitGitGadget @ 2021-05-06 16:37 UTC (permalink / raw)
  To: git; +Cc: Lars Berntzon, Lars Berntzon

From: Lars Berntzon <lars.berntzon@external.atlascopco.com>

Signed-off-by: Lars Berntzon <lars.berntzon@cecilia-data.se>
---
    Attempt to clarify a blurry sentence.
    
    Signed-off-by: Lars Berntzon lars.berntzon@cecilia-data.se

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1019%2Flboclboc%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1019/lboclboc/master-v1
Pull-Request: https://github.com/git/git/pull/1019

 Documentation/git-push.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index a953c7c38790..bbb30c52395e 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -66,10 +66,10 @@ it can be any arbitrary "SHA-1 expression", such as `master~4` or
 The <dst> tells which ref on the remote side is updated with this
 push. Arbitrary expressions cannot be used here, an actual ref must
 be named.
-If `git push [<repository>]` without any `<refspec>` argument is set to
-update some ref at the destination with `<src>` with
-`remote.<repository>.push` configuration variable, `:<dst>` part can
-be omitted--such a push will update a ref that `<src>` normally updates
+If `git push [<repository>]` without any `<refspec>` argument then
+git will update the remote ref as defined by `remote.<repository>.push` configuration
+and it will be updated from HEAD.
+`:<dst>` part can be omitted--such a push will update a ref that `<src>` normally updates
 without any `<refspec>` on the command line.  Otherwise, missing
 `:<dst>` means to update the same ref as the `<src>`.
 +

base-commit: 7e391989789db82983665667013a46eabc6fc570
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc: attempt to clarify a blurry sentence.
  2021-05-06 16:37 [PATCH] doc: attempt to clarify a blurry sentence Lars Berntzon via GitGitGadget
@ 2021-05-06 22:03 ` Junio C Hamano
  2021-05-07  8:35 ` Lars Berntzon
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2021-05-06 22:03 UTC (permalink / raw)
  To: Lars Berntzon via GitGitGadget; +Cc: git, Lars Berntzon, Lars Berntzon

"Lars Berntzon via GitGitGadget" <gitgitgadget@gmail.com> writes:

> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index a953c7c38790..bbb30c52395e 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> @@ -66,10 +66,10 @@ it can be any arbitrary "SHA-1 expression", such as `master~4` or
>  The <dst> tells which ref on the remote side is updated with this
>  push. Arbitrary expressions cannot be used here, an actual ref must
>  be named.
> -If `git push [<repository>]` without any `<refspec>` argument is set to
> -update some ref at the destination with `<src>` with
> -`remote.<repository>.push` configuration variable, `:<dst>` part can
> -be omitted--such a push will update a ref that `<src>` normally updates
> +If `git push [<repository>]` without any `<refspec>` argument then
> +git will update the remote ref as defined by `remote.<repository>.push` configuration
> +and it will be updated from HEAD.
> +`:<dst>` part can be omitted--such a push will update a ref that `<src>` normally updates

Hmph, "If X then Git will do Y" expects X to be a full sentence with
subject and verb, but I do not see any verb in 

    `git push [<repository>]` without any `<refspec>` argument

in the rewritten version.

More importantly, the updated description is wrong.  The original
may be hard to follow, but what it is trying to explain is the
following.

Imagine that you have configured

	[remote "origin"]
		push = refs/heads/*:refs/remotes/satellite/*

Imagine further that you have a local branch 'next' and you want to
push it out to the "origin".  You also have other local branches
like 'master' and 'maint', but you do not wish to push them out
right now.

Under such a scenario, if you were to type

    $ git push origin

(i.e. "`git push [<repository>]` without `<refspec>` argument"),
such a command is set to update `refs/remotes/satellite/next`
(i.e. "some ref") at the "origin" (i.e. "the destination") with
`next` (i.e. "with <src>") via the remote.origin.push configuration
variable.  So this scenario satisfies the precondition of the
description we are discussing.

In such a case, you do not have to fully spell out

    $ git push origin next:refs/remotes/satellite/next

in order to push your 'next' branch (which may not be the current
branch) from the command line to its usual/configured destination.

Instead, you can omit ":<dst>", i.e.

    $ git push origin next

and such a push will update the remote ref that would be normally
updated by the local ref named on the command line, i.e. the remote
'refs/remotes/satellite/next' will be updated with your local
'refs/heads/next'.  But your 'master' and 'maint' will not be pushed
to their usual/configured destinations with such a push.

Again, the original may hard to read and it can use some rewriting
to make it easier to read.  Thanks for trying to help by attempting,
and another try with the above information in mind is greatly
appreciated.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc: attempt to clarify a blurry sentence.
  2021-05-06 16:37 [PATCH] doc: attempt to clarify a blurry sentence Lars Berntzon via GitGitGadget
  2021-05-06 22:03 ` Junio C Hamano
@ 2021-05-07  8:35 ` Lars Berntzon
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Berntzon @ 2021-05-07  8:35 UTC (permalink / raw)
  To: git

Yes, your text is clear. I realize now I miss-read the line as if it was:

   If git push [<repository>] without any <refspec> argument is set, to 
-update some ref at the destination with <src> with....

I mentally placed the comma there and then I could not get pass that 
(and for me there was no verb there to start with so I though it was the 
git-doc lingua).

But the main problem I have I guess is that the line refers to and , but 
those comes from the ref-spec, but the whole line is about when ref-spec 
is not specified so the placeholders and are not valid. Also your 
clarification contain <src> and <dst> but again without ref-spec that is 
not defined.

Regards, Lars

On 2021-05-06 18:37, Lars Berntzon via GitGitGadget wrote:
> From: Lars Berntzon <lars.berntzon@external.atlascopco.com>
>
> Signed-off-by: Lars Berntzon <lars.berntzon@cecilia-data.se>
> ---
>      Attempt to clarify a blurry sentence.
>      
>      Signed-off-by: Lars Berntzon lars.berntzon@cecilia-data.se
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1019%2Flboclboc%2Fmaster-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1019/lboclboc/master-v1
> Pull-Request: https://github.com/git/git/pull/1019
>
>   Documentation/git-push.txt | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index a953c7c38790..bbb30c52395e 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> @@ -66,10 +66,10 @@ it can be any arbitrary "SHA-1 expression", such as `master~4` or
>   The <dst> tells which ref on the remote side is updated with this
>   push. Arbitrary expressions cannot be used here, an actual ref must
>   be named.
> -If `git push [<repository>]` without any `<refspec>` argument is set to
> -update some ref at the destination with `<src>` with
> -`remote.<repository>.push` configuration variable, `:<dst>` part can
> -be omitted--such a push will update a ref that `<src>` normally updates
> +If `git push [<repository>]` without any `<refspec>` argument then
> +git will update the remote ref as defined by `remote.<repository>.push` configuration
> +and it will be updated from HEAD.
> +`:<dst>` part can be omitted--such a push will update a ref that `<src>` normally updates
>   without any `<refspec>` on the command line.  Otherwise, missing
>   `:<dst>` means to update the same ref as the `<src>`.
>   +
>
> base-commit: 7e391989789db82983665667013a46eabc6fc570

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-07  8:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 16:37 [PATCH] doc: attempt to clarify a blurry sentence Lars Berntzon via GitGitGadget
2021-05-06 22:03 ` Junio C Hamano
2021-05-07  8:35 ` Lars Berntzon

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git