From: Johannes Sixt Date: Mon, 21 Jul 2008 20:06:32 GMT Subject: [PATCH] checkout without arguments does not make sense Message-ID: <200807212206.32818.johannes.sixt@telecom.at> Signed-off-by: Johannes Sixt --- 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