git-read-tree --index-output=<file>
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 <junkio@cox.net>
This commit is contained in:
@ -84,7 +84,7 @@ static void prime_cache_tree(void)
|
||||
|
||||
}
|
||||
|
||||
static const char read_tree_usage[] = "git-read-tree (<sha> | [[-m [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] <sha1> [<sha2> [<sha3>]])";
|
||||
static const char read_tree_usage[] = "git-read-tree (<sha> | [[-m [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] [--index-output=<file>] <sha1> [<sha2> [<sha3>]])";
|
||||
|
||||
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=<subdirectory>/" means keep the current index
|
||||
* entries and put the entries from the tree under the
|
||||
* given subdirectory.
|
||||
|
Reference in New Issue
Block a user