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

[PATCH] reset --mixed message update, tell the user what will work

From
David Fries <david@fries.net>
Date
Jul 18, 2010, 03:37 UTC
Message-ID
<20100718033722.GA15631@spacedout.fries.net>

Instead of, fatal: mixed reset is not allowed in a bare repository print, fatal: mixed reset is not allowed in a bare repository, use --soft To tell the user what they can do, instead of just what they can't. --- When I was first learning how to use git and I needed to reset my bare repository I would make it a full repository just so I could use git-reset, a message like the above would have saved me effort back then.

 builtin/reset.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index 1283068..ebbefe0 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -332,7 +332,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
 		setup_work_tree();
 
 	if (reset_type == MIXED && is_bare_repository())
-		die("%s reset is not allowed in a bare repository",
+		die("%s reset is not allowed in a bare repository, use --soft",
 		    reset_type_names[reset_type]);
 
 	/* Soft reset does not touch the index file nor the working tree
-- 
1.7.1
Message 1 of 1 in “reset --mixed message update, tell the user what will work”
  1. reset --mixed message update, tell the user what will workDavid Fries, Jul 18, 2010

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.