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

[PATCH] read-tree: replace bracket set with parentheses to clarify usage

From
Alex Henrie <alexhenrie24@gmail.com>
Date
Aug 27, 2015, 04:27 UTC
Message-ID
<1440649626-3751-1-git-send-email-alexhenrie24@gmail.com>

-u and -i can only be given if -m, --reset, or --prefix is given. Without parentheses, it looks like -u and -i can be used no matter what, and the second pair of brackets is confusing.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
 builtin/read-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index 43b47f7..2379e11 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -34,7 +34,7 @@ static int list_tree(unsigned char *sha1)
 }
 
 static const char * const read_tree_usage[] = {
-	N_("git read-tree [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u [--exclude-per-directory=<gitignore>] | -i]] [--no-sparse-checkout] [--index-output=<file>] (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"),
+	N_("git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>) [-u [--exclude-per-directory=<gitignore>] | -i]] [--no-sparse-checkout] [--index-output=<file>] (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"),
 	NULL
 };
 
-- 
2.5.0
Message 1 of 1 in “read-tree: replace bracket set with parentheses to clarify usage”
  1. read-tree: replace bracket set with parentheses to clarify usageAlex Henrie, Aug 27, 2015

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.