summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a7154e9)
raw | patch | inline | side by side (parent: a7154e9)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 19 Sep 2005 18:33:14 +0000 (11:33 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 20 Sep 2005 22:07:52 +0000 (15:07 -0700) |
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>
merge strategy. Also -i should require -m as well, which the command
did not check.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-read-tree.txt | patch | blob | history | |
read-tree.c | patch | blob | history |
index 2178a0ae3ef1fd4e43ac557c6d14d6ec756d9552..0639bd04b2915c1e381021ef2018b203adc13b4b 100644 (file)
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
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.
diff --git a/read-tree.c b/read-tree.c
index 6a5c08c4c6903fec45cbe37a63f0bc42fbae53bc..ca808739dba4235f0f8a5777ff4bbfe4443d1d27 100644 (file)
--- a/read-tree.c
+++ b/read-tree.c
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)