git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] (trivial) add helpful "use --soft" for bare reset
@ 2011-06-26 22:14 David Fries
  2011-06-30 17:21 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: David Fries @ 2011-06-26 22:14 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

Add a helpful "use --soft" message for git-reset (mixed) in a bare
repository.  This tells the user what they can do, instead of just what
they can't.

Signed-off-by: David Fries <David@Fries.net>
---
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 a lot of
effort back then.

I'm not the only one, I received an e-mail yesterday confused on what
to do, found my patch via google "it saved my bacon."

 builtin/reset.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin/reset.c b/builtin/reset.c
index 98bca04..dd0cc1e 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.2.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-01 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-26 22:14 [PATCH] (trivial) add helpful "use --soft" for bare reset David Fries
2011-06-30 17:21 ` Junio C Hamano
2011-06-30 19:06   ` David Fries
2011-06-30 20:06     ` Junio C Hamano
2011-06-30 22:08       ` David Fries
2011-07-01 16:39         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).