{"thread":{"id":"63941","subject":"[PATCH] docs: update description for '--mirror' option for 'git push'","startedAt":"2025-08-11T14:34:47Z","lastAt":"2025-09-18T20:58:44Z","messageCount":6,"participants":["Gustavo Velasco-Hernández via GitGitGadget","Junio C Hamano","Kristoffer Haugsbakk"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"523946","messageId":"pull.2028.git.git.1754922884439.gitgitgadget@gmail.com","threadId":"63941","inReplyTo":null,"subject":"[PATCH] docs: update description for '--mirror' option for 'git push'","fromName":"Gustavo Velasco-Hernández via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-08-11T14:34:44Z","receivedAt":"2025-08-11T14:34:47Z","isPatch":true,"sender":{"key":"name:Gustavo Velasco-Hernández","avatar":null},"body":"From: \"Velasco-Hernandez, Gustavo\" <Gustavo.Velasco-Hernandez@netapp.com>\n\nThe current description considers only created, updated or deleted refs\nlocally. However it does not address the case where new refs were created\non the remote end, in which case, are also deleted.\n\nSigned-off-by: Gustavo Velasco-Hernandez <gustavo.velascoh@gmail.com>\n---\n    Docs: Update description for '--mirror' option for 'git push'\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2028%2Fgustavovelascoh%2Fgit-push-update-docs-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2028/gustavovelascoh/git-push-update-docs-v1\nPull-Request: https://github.com/git/git/pull/2028\n\n Documentation/git-push.adoc | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-push.adoc b/Documentation/git-push.adoc\nindex d1978650d60..9d543f823de 100644\n--- a/Documentation/git-push.adoc\n+++ b/Documentation/git-push.adoc\n@@ -166,9 +166,10 @@ already exists on the remote side.\n \tbe mirrored to the remote repository.  Newly created local\n \trefs will be pushed to the remote end, locally updated refs\n \twill be force updated on the remote end, and deleted refs\n-\twill be removed from the remote end.  This is the default\n-\tif the configuration option `remote.<remote>.mirror` is\n-\tset.\n+\twill be removed from the remote end. Any ref existing\n+\tin the remote end, but not locally, will be removed too.\n+\tThis is the default if the configuration option\n+\t`remote.<remote>.mirror` is set.\n \n -n::\n --dry-run::\n\nbase-commit: 2c2ba49d55ff26c1082b8137b1ec5eeccb4337d1\n-- \ngitgitgadget\n"},{"id":"523959","messageId":"xmqqcy913j62.fsf@gitster.g","threadId":"63941","inReplyTo":"pull.2028.git.git.1754922884439.gitgitgadget@gmail.com","subject":"Re: [PATCH] docs: update description for '--mirror' option for 'git push'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-11T16:41:25Z","receivedAt":"2025-08-11T16:41:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Gustavo Velasco-Hernández via GitGitGadget\"\n<gitgitgadget@gmail.com> writes:\n\n> From: \"Velasco-Hernandez, Gustavo\" <Gustavo.Velasco-Hernandez@netapp.com>\n>\n> The current description considers only created, updated or deleted refs\n> locally. However it does not address the case where new refs were created\n> on the remote end, in which case, are also deleted.\n\nCorrect, but \"they added, we didn't do anything\" is a mere special\ncase of \"what we have and they have do not match\" and\nindistinguishable from \"they updated, we removed\" for example.\n\nAnd there is not much point trying to be exhaustive after saying\n\"... be mirrored to the remote repository.\"  If we are to improve\nthe test, we should think about rewriting the whole sentence\nstarting from \"Newly created ...\".  After all, they are giving mere\nexamples and cannot be exhaustive (think: which one of these existing\nexamples cover \"we created, they created differently---their value\ngoes away and ours win\" case).\n\n    ... be mirrored to the remote repository.  This overwrites the\n    refs at the remote by (1) removing what is only at the remote,\n    (2) force-updating what both ends of the connection have, and\n    (3) adding what only exists locally.  This is the default ...\n\nor something, perhaps?\n\nThanks.\n\n>\n> Signed-off-by: Gustavo Velasco-Hernandez <gustavo.velascoh@gmail.com>\n> ---\n>     Docs: Update description for '--mirror' option for 'git push'\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2028%2Fgustavovelascoh%2Fgit-push-update-docs-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2028/gustavovelascoh/git-push-update-docs-v1\n> Pull-Request: https://github.com/git/git/pull/2028\n>\n>  Documentation/git-push.adoc | 7 ++++---\n>  1 file changed, 4 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-push.adoc b/Documentation/git-push.adoc\n> index d1978650d60..9d543f823de 100644\n> --- a/Documentation/git-push.adoc\n> +++ b/Documentation/git-push.adoc\n> @@ -166,9 +166,10 @@ already exists on the remote side.\n>  \tbe mirrored to the remote repository.  Newly created local\n>  \trefs will be pushed to the remote end, locally updated refs\n>  \twill be force updated on the remote end, and deleted refs\n> -\twill be removed from the remote end.  This is the default\n> -\tif the configuration option `remote.<remote>.mirror` is\n> -\tset.\n> +\twill be removed from the remote end. Any ref existing\n> +\tin the remote end, but not locally, will be removed too.\n> +\tThis is the default if the configuration option\n> +\t`remote.<remote>.mirror` is set.\n>  \n>  -n::\n>  --dry-run::\n>\n> base-commit: 2c2ba49d55ff26c1082b8137b1ec5eeccb4337d1\n"},{"id":"526450","messageId":"pull.2028.v2.git.git.1758038628948.gitgitgadget@gmail.com","threadId":"63941","inReplyTo":"pull.2028.git.git.1754922884439.gitgitgadget@gmail.com","subject":"[PATCH v2] docs: update description for '--mirror' option for 'git push'","fromName":"Gustavo Velasco-Hernández via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-09-16T16:03:48Z","receivedAt":"2025-09-16T16:03:51Z","isPatch":true,"sender":{"key":"name:Gustavo Velasco-Hernández","avatar":null},"body":"From: \"Velasco-Hernandez, Gustavo\" <Gustavo.Velasco-Hernandez@netapp.com>\n\nThe current description considers only created, updated or deleted refs\nlocally. However it does not address the case where new refs were created\non the remote end, in which case, are also deleted. The description has\nbeen reworded to describe what is removed, updated or added. (Based on\nJunio feedback)\n\nSigned-off-by: Gustavo Velasco-Hernandez <gustavo.velascoh@gmail.com>\n---\n    Docs: Update description for '--mirror' option for 'git push'\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2028%2Fgustavovelascoh%2Fgit-push-update-docs-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2028/gustavovelascoh/git-push-update-docs-v2\nPull-Request: https://github.com/git/git/pull/2028\n\nRange-diff vs v1:\n\n 1:  2be0bf6e73 ! 1:  ab077544b6 docs: update description for '--mirror' option for 'git push'\n     @@ Commit message\n      \n          The current description considers only created, updated or deleted refs\n          locally. However it does not address the case where new refs were created\n     -    on the remote end, in which case, are also deleted.\n     +    on the remote end, in which case, are also deleted. The description has\n     +    been reworded to describe what is removed, updated or added. (Based on\n     +    Junio feedback)\n      \n          Signed-off-by: Gustavo Velasco-Hernandez <gustavo.velascoh@gmail.com>\n      \n       ## Documentation/git-push.adoc ##\n      @@ Documentation/git-push.adoc: already exists on the remote side.\n     - \tbe mirrored to the remote repository.  Newly created local\n     - \trefs will be pushed to the remote end, locally updated refs\n     - \twill be force updated on the remote end, and deleted refs\n     + \tInstead of naming each ref to push, specifies that all\n     + \trefs under `refs/` (which includes but is not\n     + \tlimited to `refs/heads/`, `refs/remotes/`, and `refs/tags/`)\n     +-\tbe mirrored to the remote repository.  Newly created local\n     +-\trefs will be pushed to the remote end, locally updated refs\n     +-\twill be force updated on the remote end, and deleted refs\n      -\twill be removed from the remote end.  This is the default\n      -\tif the configuration option `remote.<remote>.mirror` is\n      -\tset.\n     -+\twill be removed from the remote end. Any ref existing\n     -+\tin the remote end, but not locally, will be removed too.\n     -+\tThis is the default if the configuration option\n     -+\t`remote.<remote>.mirror` is set.\n     ++\tbe mirrored to the remote repository. This overwrites the\n     ++\trefs at the remote by (1) removing what is only at the remote,\n     ++\t(2) force-updating what both ends of the connection have, and\n     ++\t(3) adding what only exists locally. This is the default if\n     ++\tthe configuration option `remote.<remote>.mirror` is set.\n       \n       -n::\n       --dry-run::\n\n\n Documentation/git-push.adoc | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-push.adoc b/Documentation/git-push.adoc\nindex 5f5408e2c0..77ce4a27c8 100644\n--- a/Documentation/git-push.adoc\n+++ b/Documentation/git-push.adoc\n@@ -163,12 +163,11 @@ already exists on the remote side.\n \tInstead of naming each ref to push, specifies that all\n \trefs under `refs/` (which includes but is not\n \tlimited to `refs/heads/`, `refs/remotes/`, and `refs/tags/`)\n-\tbe mirrored to the remote repository.  Newly created local\n-\trefs will be pushed to the remote end, locally updated refs\n-\twill be force updated on the remote end, and deleted refs\n-\twill be removed from the remote end.  This is the default\n-\tif the configuration option `remote.<remote>.mirror` is\n-\tset.\n+\tbe mirrored to the remote repository. This overwrites the\n+\trefs at the remote by (1) removing what is only at the remote,\n+\t(2) force-updating what both ends of the connection have, and\n+\t(3) adding what only exists locally. This is the default if\n+\tthe configuration option `remote.<remote>.mirror` is set.\n \n -n::\n --dry-run::\n\nbase-commit: a483264b01b977f3e65a4419103c21e6af7412a2\n-- \ngitgitgadget\n"},{"id":"526462","messageId":"xmqqzfaumi2b.fsf@gitster.g","threadId":"63941","inReplyTo":"pull.2028.v2.git.git.1758038628948.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] docs: update description for '--mirror' option for 'git push'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-16T17:19:08Z","receivedAt":"2025-09-16T17:19:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Gustavo Velasco-Hernández via GitGitGadget\"\n<gitgitgadget@gmail.com> writes:\n\n> From: \"Velasco-Hernandez, Gustavo\" <Gustavo.Velasco-Hernandez@netapp.com>\n> Signed-off-by: Gustavo Velasco-Hernandez <gustavo.velascoh@gmail.com>\n\nFor this project to use a patch, these two must match.\n\nPlease decide, under which name do you want to be known as to this\ncommunity.  Once you decide, please use that chosen name to\nconfigure user.name and user.email for the repository you use to\nwork on Git, amend the commit and update the sign-off using the same\nidentity, and the force push to GitGitGadget to /submit (I am not\nsure about the last two steps as I am not a GGG user)?\n\n> The current description considers only created, updated or deleted refs\n> locally. However it does not address the case where new refs were created\n> on the remote end, in which case, are also deleted. The description has\n> been reworded to describe what is removed, updated or added. (Based on\n> Junio feedback)\n\nDrop \"(Based on Junio feedback)\" that is not even grammatical ;-)\nIf you want to credit others, it is common to say\n\n    Helped-by: ...\n\njust before your own sign-off.  See an example like\n\nhttps://lore.kernel.org/git/2f78ab2e28c64f05d807cb9460fa62eb1011a57f.1757879060.git.code@khaugsbakk.name/\n\n(by the way, oh, gee, that's an unwieldy long message ID).\n\n>  Documentation/git-push.adoc | 11 +++++------\n>  1 file changed, 5 insertions(+), 6 deletions(-)\n>\n> diff --git a/Documentation/git-push.adoc b/Documentation/git-push.adoc\n> index 5f5408e2c0..77ce4a27c8 100644\n> --- a/Documentation/git-push.adoc\n> +++ b/Documentation/git-push.adoc\n> @@ -163,12 +163,11 @@ already exists on the remote side.\n>  \tInstead of naming each ref to push, specifies that all\n>  \trefs under `refs/` (which includes but is not\n>  \tlimited to `refs/heads/`, `refs/remotes/`, and `refs/tags/`)\n> -\tbe mirrored to the remote repository.  Newly created local\n> -\trefs will be pushed to the remote end, locally updated refs\n> -\twill be force updated on the remote end, and deleted refs\n> -\twill be removed from the remote end.  This is the default\n> -\tif the configuration option `remote.<remote>.mirror` is\n> -\tset.\n> +\tbe mirrored to the remote repository. This overwrites the\n> +\trefs at the remote by (1) removing what is only at the remote,\n> +\t(2) force-updating what both ends of the connection have, and\n> +\t(3) adding what only exists locally. This is the default if\n> +\tthe configuration option `remote.<remote>.mirror` is set.\n\nReads very clearly.  Thanks.\n"},{"id":"526474","messageId":"97770221-63b8-4375-9787-991717594938@app.fastmail.com","threadId":"63941","inReplyTo":"xmqqzfaumi2b.fsf@gitster.g","subject":"Re: [PATCH v2] docs: update description for '--mirror' option for 'git push'","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-09-16T20:04:34Z","receivedAt":"2025-09-16T20:04:55Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Tue, Sep 16, 2025, at 19:19, Junio C Hamano wrote:\n>> The current description considers only created, updated or deleted refs\n>> locally. However it does not address the case where new refs were created\n>> on the remote end, in which case, are also deleted. The description has\n>> been reworded to describe what is removed, updated or added. (Based on\n>> Junio feedback)\n>\n> Drop \"(Based on Junio feedback)\" that is not even grammatical ;-)\n> If you want to credit others, it is common to say\n>\n>     Helped-by: ...\n>\n> just before your own sign-off.  See an example like\n>\n> https://lore.kernel.org/git/2f78ab2e28c64f05d807cb9460fa62eb1011a57f.1757879060.git.code@khaugsbakk.name/\n>\n> (by the way, oh, gee, that's an unwieldy long message ID).\n\nIt is.  Considering I only send out (git send-)emails at most\nevery 15 seconds. ;–(\n"},{"id":"526728","messageId":"78b4ca8a-0440-46a6-8281-a369cb73c304@app.fastmail.com","threadId":"63941","inReplyTo":"97770221-63b8-4375-9787-991717594938@app.fastmail.com","subject":"Re: [PATCH v2] docs: update description for '--mirror' option for 'git push'","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-09-18T20:58:22Z","receivedAt":"2025-09-18T20:58:44Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Tue, Sep 16, 2025, at 22:04, Kristoffer Haugsbakk wrote:\n>>[snip]\n>> just before your own sign-off.  See an example like\n>>\n>> https://lore.kernel.org/git/2f78ab2e28c64f05d807cb9460fa62eb1011a57f.1757879060.git.code@khaugsbakk.name/\n>>\n>> (by the way, oh, gee, that's an unwieldy long message ID).\n>\n> It is.  Considering I only send out (git send-)emails at most\n> every 15 seconds. ;–(\n\nAnd I don’t understand why there’s a full SHA1 plus the Unix time.[1]\nThe Unix time ends up being the same on all patches.  So you need\nsomething more.  But the abbreviated SHA1 for each commit guarantees\nthat each Message-ID (msgid) will be unique, no?  Why the whole thing?\n\nWith an abbreviated SHA1 + Unix time you get:\n\n1. Unique substrings within series from the SHA1s\n2. Unique substring among other series from the Unix time unless you\n   generate and send out emails very fast\n\nIt wouldn’t surprise me if there are people who have taken advantage of\nthe format to harvest the SHA1 from the message id, even though it isn’t\ndocumented (seems like).  But I think I’ll be fine with an abbreviated\nhash in my own tree.\n\n† 1: I did some spelunking and it seems like it has always had this\n    format.[2] Or at least in the C form.  I don’t know if there was a\n    previous shell or Perl form.\n† 2: See d1566f7883f (git-format-patch: Make the second and subsequent mails\n    replies to the first, 2006-07-14)\n\n-- \nKriHau\n\n"}]}