From 5e7f56ac33f7a5583f9fa4e0b6088709fea7a6f8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 31 Mar 2007 23:27:41 -0700 Subject: git-read-tree --index-output= This corrects the interface mistake of the previous one, and gives a command line parameter to the only plumbing command that currently needs it: "git-read-tree". We can add the calls to set_alternate_index_output() to other plumbing commands that update the index if/when needed. Signed-off-by: Junio C Hamano --- builtin-read-tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'builtin-read-tree.c') diff --git a/builtin-read-tree.c b/builtin-read-tree.c index 87048f82e..213bd93c7 100644 --- a/builtin-read-tree.c +++ b/builtin-read-tree.c @@ -84,7 +84,7 @@ static void prime_cache_tree(void) } -static const char read_tree_usage[] = "git-read-tree ( | [[-m [--aggressive] | --reset | --prefix=] [-u | -i]] [--exclude-per-directory=] [ []])"; +static const char read_tree_usage[] = "git-read-tree ( | [[-m [--aggressive] | --reset | --prefix=] [-u | -i]] [--exclude-per-directory=] [--index-output=] [ []])"; static struct lock_file lock_file; @@ -128,6 +128,11 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix) continue; } + if (!prefixcmp(arg, "--index-output=")) { + set_alternate_index_output(arg + 15); + continue; + } + /* "--prefix=/" means keep the current index * entries and put the entries from the tree under the * given subdirectory. -- cgit v1.2.1