Skip to contentSkip to conversation

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

PATCH New David Fries 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset --mixed message update, tell the user what will work

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(-)
builtin/reset.c +1 -1
index 1283068..ebbefe0 100644
@@ -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
Signature · 1 line
1.7.1