{"thread":{"id":"24426","subject":"[PATCH] reset --mixed message update, tell the user what will work","startedAt":"2010-07-18T03:37:24Z","lastAt":"2010-07-18T03:37:24Z","messageCount":1,"participants":["David Fries"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"145741","messageId":"20100718033722.GA15631@spacedout.fries.net","threadId":"24426","inReplyTo":null,"subject":"[PATCH] reset --mixed message update, tell the user what will work","fromName":"David Fries","fromEmail":"david@fries.net","sentAt":"2010-07-18T03:37:24Z","receivedAt":"2010-07-18T03:37:24Z","isPatch":true,"sender":{"key":"david@fries.net","avatar":"https://avatars.githubusercontent.com/u/2767875?v=4"},"body":"Instead of,\nfatal: mixed reset is not allowed in a bare repository\nprint,\nfatal: mixed reset is not allowed in a bare repository, use --soft\nTo tell the user what they can do, instead of just what they can't.\n---\nWhen I was first learning how to use git and I needed to reset my bare\nrepository I would make it a full repository just so I could use\ngit-reset, a message like the above would have saved me effort back\nthen.\n\n builtin/reset.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex 1283068..ebbefe0 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -332,7 +332,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \t\tsetup_work_tree();\n \n \tif (reset_type == MIXED && is_bare_repository())\n-\t\tdie(\"%s reset is not allowed in a bare repository\",\n+\t\tdie(\"%s reset is not allowed in a bare repository, use --soft\",\n \t\t    reset_type_names[reset_type]);\n \n \t/* Soft reset does not touch the index file nor the working tree\n-- \n1.7.1\n"}]}