git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkout without arguments does not make sense
@ 2008-07-21 20:06 Johannes Sixt
  2008-07-21 20:49 ` Miklos Vajna
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Sixt @ 2008-07-21 20:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 builtin-checkout.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/builtin-checkout.c b/builtin-checkout.c
index fbd5105..669be0e 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -487,7 +487,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 		}
 
 		return checkout_paths(source_tree, pathspec);
-	}
+	} else if (!new.name && !opts.new_branch)
+		usage_with_options(checkout_usage, options);
 
 	if (new.name && !new.commit) {
 		die("Cannot switch branch to a non-commit.");
-- 
1.6.0.rc0.18.g6aef2

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

end of thread, other threads:[~2008-07-22  0:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-21 20:06 [PATCH] checkout without arguments does not make sense Johannes Sixt
2008-07-21 20:49 ` Miklos Vajna
2008-07-21 21:11   ` Johannes Sixt
2008-07-21 21:36   ` Avery Pennarun
2008-07-21 21:44     ` Miklos Vajna
2008-07-22  0:57       ` Johannes Schindelin

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).