[PATCH] checkout without arguments does not make sense
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