git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] checkout without arguments does not make sense

From
Johannes Sixt <johannes.sixt@telecom.at>
Date
Jul 21, 2008, 20:06 UTC
Message-ID
<200807212206.32818.johannes.sixt@telecom.at>
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
Next: Miklos Vajna
Message 1 of 6 in “checkout without arguments does not make sense”
  1. checkout without arguments does not make senseJohannes Sixt, Jul 21, 2008
  2. Miklos VajnaJul 21, 2008
  3. Johannes SixtJul 21, 2008
  4. Avery PennarunJul 21, 2008
  5. Miklos VajnaJul 21, 2008
  6. Johannes SchindelinJul 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.