git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] reset: update help text

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Mar 29, 2011, 13:20 UTC
Message-ID
<1301404805-12095-1-git-send-email-pclouds@gmail.com>
State --mixed is the default so users don't have to open up man page.
Also make it clear how --hard and --merge are different.

Move -q to bottom because it's not that important to pay attention to as the first item.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/reset.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index eb5f98c..7419c9e 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -243,17 +243,17 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
 	struct commit *commit;
 	char *reflog_action, msg[1024];
 	const struct option options[] = {
-		OPT__QUIET(&quiet, "be quiet, only report errors"),
 		OPT_SET_INT(0, "mixed", &reset_type,
-						"reset HEAD and index", MIXED),
+				"reset HEAD and index (default)", MIXED),
 		OPT_SET_INT(0, "soft", &reset_type, "reset only HEAD", SOFT),
 		OPT_SET_INT(0, "hard", &reset_type,
 				"reset HEAD, index and working tree", HARD),
 		OPT_SET_INT(0, "merge", &reset_type,
-				"reset HEAD, index and working tree", MERGE),
+				"like --hard but keep local changes in working tree", MERGE),
 		OPT_SET_INT(0, "keep", &reset_type,
 				"reset HEAD but keep local changes", KEEP),
 		OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),
+		OPT__QUIET(&quiet, "be quiet, only report errors"),
 		OPT_END()
 	};
 
-- 
1.7.4.74.g639db
Next: Nguyen Thai Ngoc Duy
Message 1 of 9 in “reset: update help text”
  1. reset: update help textNguyễn Thái Ngọc Duy, Mar 29, 2011
  2. Nguyen Thai Ngoc DuyMar 29, 2011
  3. Jonathan NiederMar 29, 2011
  4. Nguyen Thai Ngoc DuyMar 31, 2011
  5. Jonathan NiederMar 31, 2011
  6. Junio C HamanoMar 31, 2011
  7. Jonathan NiederMar 31, 2011
  8. Nguyen Thai Ngoc DuyApr 2, 2011
  9. Junio C HamanoMar 31, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.