From: Junio C Hamano <gitster@pobox.com>
To: "Gustavo Velasco-Hernández via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
"Gustavo Velasco-Hernández" <gustavo.velascoh@gmail.com>,
"Velasco-Hernandez,
Gustavo" <Gustavo.Velasco-Hernandez@netapp.com>
Subject: Re: [PATCH] docs: update description for '--mirror' option for 'git push'
Date: Mon, 11 Aug 2025 09:41:25 -0700 [thread overview]
Message-ID: <xmqqcy913j62.fsf@gitster.g> (raw)
In-Reply-To: <pull.2028.git.git.1754922884439.gitgitgadget@gmail.com> ("Gustavo Velasco-Hernández via GitGitGadget"'s message of "Mon, 11 Aug 2025 14:34:44 +0000")
"Gustavo Velasco-Hernández via GitGitGadget"
<gitgitgadget@gmail.com> writes:
> From: "Velasco-Hernandez, Gustavo" <Gustavo.Velasco-Hernandez@netapp.com>
>
> The current description considers only created, updated or deleted refs
> locally. However it does not address the case where new refs were created
> on the remote end, in which case, are also deleted.
Correct, but "they added, we didn't do anything" is a mere special
case of "what we have and they have do not match" and
indistinguishable from "they updated, we removed" for example.
And there is not much point trying to be exhaustive after saying
"... be mirrored to the remote repository." If we are to improve
the test, we should think about rewriting the whole sentence
starting from "Newly created ...". After all, they are giving mere
examples and cannot be exhaustive (think: which one of these existing
examples cover "we created, they created differently---their value
goes away and ours win" case).
... be mirrored to the remote repository. This overwrites the
refs at the remote by (1) removing what is only at the remote,
(2) force-updating what both ends of the connection have, and
(3) adding what only exists locally. This is the default ...
or something, perhaps?
Thanks.
>
> Signed-off-by: Gustavo Velasco-Hernandez <gustavo.velascoh@gmail.com>
> ---
> Docs: Update description for '--mirror' option for 'git push'
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2028%2Fgustavovelascoh%2Fgit-push-update-docs-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2028/gustavovelascoh/git-push-update-docs-v1
> Pull-Request: https://github.com/git/git/pull/2028
>
> Documentation/git-push.adoc | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-push.adoc b/Documentation/git-push.adoc
> index d1978650d60..9d543f823de 100644
> --- a/Documentation/git-push.adoc
> +++ b/Documentation/git-push.adoc
> @@ -166,9 +166,10 @@ already exists on the remote side.
> be mirrored to the remote repository. Newly created local
> refs will be pushed to the remote end, locally updated refs
> will be force updated on the remote end, and deleted refs
> - will be removed from the remote end. This is the default
> - if the configuration option `remote.<remote>.mirror` is
> - set.
> + will be removed from the remote end. Any ref existing
> + in the remote end, but not locally, will be removed too.
> + This is the default if the configuration option
> + `remote.<remote>.mirror` is set.
>
> -n::
> --dry-run::
>
> base-commit: 2c2ba49d55ff26c1082b8137b1ec5eeccb4337d1
next prev parent reply other threads:[~2025-08-11 16:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 14:34 [PATCH] docs: update description for '--mirror' option for 'git push' Gustavo Velasco-Hernández via GitGitGadget
2025-08-11 16:41 ` Junio C Hamano [this message]
2025-09-16 16:03 ` [PATCH v2] " Gustavo Velasco-Hernández via GitGitGadget
2025-09-16 17:19 ` Junio C Hamano
2025-09-16 20:04 ` Kristoffer Haugsbakk
2025-09-18 20:58 ` Kristoffer Haugsbakk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqcy913j62.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Gustavo.Velasco-Hernandez@netapp.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gustavo.velascoh@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).