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 <junkio@cox.net>
Junio C Hamano committed
Sep 19, 2005 at 11:33 UTC
f318dd229f9df88470de8541916d48c9380e2e35
2 files changed
+12
-2
Documentation/git-read-tree.txt
+11
-1
@@ -9,7 +9,7 @@ git-read-tree - Reads tree information into the directory cache
9
10
SYNOPSIS
11
--------
12
-'git-read-tree' (<tree-ish> | [-m [-u]] <tree-ish1> [<tree-ish2> [<tree-ish3>]])
12
+'git-read-tree' (<tree-ish> | [-m [-u|-i]] <tree-ish1> [<tree-ish2> [<tree-ish3>]])
13
14
15
DESCRIPTION
@@ -35,6 +35,16 @@ OPTIONS
35
After a successful merge, update the files in the work
36
tree with the result of the merge.
37
38
+-i::
39
+ Usually a merge requires the index file as well as the
40
+ files in the working tree are up to date with the
41
+ current head commit, in order not to lose local
42
+ changes. This flag disables the check with the working
43
+ tree and is meant to be used when creating a merge of
44
+ trees that are not directly related to the current
45
+ working tree status into a temporary index file.
46
+
47
+
48
<tree-ish#>::
49
The id of the tree object(s) to be read/merged.
50
read-tree.c
+1
-1
@@ -655,7 +655,7 @@ int main(int argc, char **argv)
655
die("failed to unpack tree object %s", arg);
656
stage++;
657
}
658
- if (update && !merge)
658
+ if ((update||index_only) && !merge)
659
usage(read_tree_usage);
660
if (merge && !fn) {
661
if (stage < 2)