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

Re: [PATCH] (trivial) add helpful "use --soft" for bare reset

From
David Fries <david@fries.net>
Date
Jun 30, 2011, 19:06 UTC
Message-ID
<20110630190608.GB26701@spacedout.fries.net>
In-Reply-To
<7vk4c3qlqa.fsf@alter.siamese.dyndns.org>

Instead of, fatal: mixed reset is not allowed in a bare repository print, fatal: mixed reset is not allowed in a bare repository, see update-ref To tell the user what they can do, instead of just what they can't.

Signed-off-by: David Fries <David@Fries.net>
---
 builtin/reset.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index 98bca04..d0d4d66 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, see update-ref"),
 		    _(reset_type_names[reset_type]));
 
 	/* Soft reset does not touch the index file nor the working tree
-- 
1.7.2.3
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “(trivial) add helpful "use --soft" for bare reset”
  1. (trivial) add helpful "use --soft" for bare resetDavid Fries, Jun 26, 2011
  2. Junio C HamanoJun 30, 2011
  3. David FriesJun 30, 2011
  4. Junio C HamanoJun 30, 2011
  5. David FriesJun 30, 2011
  6. Junio C HamanoJul 1, 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.