{"thread":{"id":"50955","subject":"[PATCH] reset.txt: update the title line to cover all use cases","startedAt":"2019-04-19T19:53:36Z","lastAt":"2019-04-21T04:53:56Z","messageCount":2,"participants":["Nguyễn Thái Ngọc Duy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"374161","messageId":"20190419093011.5753-1-pclouds@gmail.com","threadId":"50955","inReplyTo":null,"subject":"[PATCH] reset.txt: update the title line to cover all use cases","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2019-04-19T09:30:11Z","receivedAt":"2019-04-19T19:53:36Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"git-reset could be used in three different ways:\n\n- move HEAD to somewhere, optionally (not) update worktree/index\n- \"move\" HEAD to HEAD, mainly to update worktree/index\n- just update the index from some tree-ish\n\nThe second case is frankly a (neat) corner case of the first one. But it\nmakes it impossible for me to summarize git-reset in one line. Without\nit at least I could write \"reset HEAD or the index\".\n\nAnd even \"reset all the things\" is not correct because reseting worktree\nselectively is the job of git-checkout, not git-reset. Sigh.\n\nThis patch is not meant to be taken seriously. It's to raise the issue\nwith git-reset documentation, and maybe someone could come up with a\nbetter summary line for git-reset. Because the current line only covers\nthe first (original) case.\n\nPS. We also need to update git-reset to mentino about its ability to\nclear branch state.\n---\n Documentation/git-reset.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt\nindex 26e746c53f..e12d8edee6 100644\n--- a/Documentation/git-reset.txt\n+++ b/Documentation/git-reset.txt\n@@ -3,7 +3,7 @@ git-reset(1)\n \n NAME\n ----\n-git-reset - Reset current HEAD to the specified state\n+git-reset - Reset \"something\"\n \n SYNOPSIS\n --------\n-- \n2.21.0.854.ge34a79f761\n\n"},{"id":"374180","messageId":"xmqqpnpgc61u.fsf@gitster-ct.c.googlers.com","threadId":"50955","inReplyTo":"20190419093011.5753-1-pclouds@gmail.com","subject":"Re: [PATCH] reset.txt: update the title line to cover all use cases","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-21T04:53:49Z","receivedAt":"2019-04-21T04:53:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:\n\n> git-reset could be used in three different ways:\n>\n> - move HEAD to somewhere, optionally (not) update worktree/index\n> - \"move\" HEAD to HEAD, mainly to update worktree/index\n> - just update the index from some tree-ish\n>\n> The second case is frankly a (neat) corner case of the first one. But it\n> makes it impossible for me to summarize git-reset in one line. Without\n> it at least I could write \"reset HEAD or the index\".\n>\n> And even \"reset all the things\" is not correct because reseting worktree\n> selectively is the job of git-checkout, not git-reset. Sigh.\n\nI am not so sure if the current one is too bad.  The primary action\nof the command is to reset the current HEAD to point at a specified\ncommit, and everything else it does is to make things consistent (in\nother words, in line with having the HEAD at the given commit) with\nrespect to different requirements.  The \"soft\" reset wants to keep\nthe index and the working tree intact, the \"merge\" reset wants to\nundo what a mergy operation would have done to the index and the\nworking tree if it started from a clean state, etc.  And \"reset the\nHEAD\" is quite approiprate for a single line summary of what the\ncommand does.  It perfectly is fine as long as the differences\nbrought in by having various \"modes\" are sufficiently described, I\nwould think.\n\n> diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt\n> index 26e746c53f..e12d8edee6 100644\n> --- a/Documentation/git-reset.txt\n> +++ b/Documentation/git-reset.txt\n> @@ -3,7 +3,7 @@ git-reset(1)\n>  \n>  NAME\n>  ----\n> -git-reset - Reset current HEAD to the specified state\n> +git-reset - Reset \"something\"\n>  \n>  SYNOPSIS\n>  --------\n"}]}