Skip to content

Commit

Permalink
Document -i flag to git-read-tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Sep 20, 2005
1 parent a7154e9 commit f318dd2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion Documentation/git-read-tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ git-read-tree - Reads tree information into the directory cache

SYNOPSIS
--------
'git-read-tree' (<tree-ish> | [-m [-u]] <tree-ish1> [<tree-ish2> [<tree-ish3>]])
'git-read-tree' (<tree-ish> | [-m [-u|-i]] <tree-ish1> [<tree-ish2> [<tree-ish3>]])


DESCRIPTION
Expand All @@ -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.


<tree-ish#>::
The id of the tree object(s) to be read/merged.

Expand Down
2 changes: 1 addition & 1 deletion read-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f318dd2

Please sign in to comment.