From: Junio C Hamano Date: Mon, 19 Sep 2005 18:33:14 +0000 (-0700) Subject: Document -i flag to git-read-tree X-Git-Tag: v0.99.8~107 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f318dd229f9df88470de8541916d48c9380e2e35;p=git.git Document -i flag to git-read-tree Somehow I missed it when we updated read-tree to support the recursive merge strategy. Also -i should require -m as well, which the command did not check. Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt index 2178a0ae..0639bd04 100644 --- a/Documentation/git-read-tree.txt +++ b/Documentation/git-read-tree.txt @@ -9,7 +9,7 @@ git-read-tree - Reads tree information into the directory cache SYNOPSIS -------- -'git-read-tree' ( | [-m [-u]] [ []]) +'git-read-tree' ( | [-m [-u|-i]] [ []]) DESCRIPTION @@ -35,6 +35,16 @@ OPTIONS After a successful merge, update the files in the work tree with the result of the merge. +-i:: + Usually a merge requires the index file as well as the + files in the working tree are up to date with the + current head commit, in order not to lose local + changes. This flag disables the check with the working + tree and is meant to be used when creating a merge of + trees that are not directly related to the current + working tree status into a temporary index file. + + :: The id of the tree object(s) to be read/merged. diff --git a/read-tree.c b/read-tree.c index 6a5c08c4..ca808739 100644 --- a/read-tree.c +++ b/read-tree.c @@ -655,7 +655,7 @@ int main(int argc, char **argv) die("failed to unpack tree object %s", arg); stage++; } - if (update && !merge) + if ((update||index_only) && !merge) usage(read_tree_usage); if (merge && !fn) { if (stage < 2)