summaryrefslogtreecommitdiff
path: root/builtin/read-tree.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-06-13 12:19:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-13 18:49:41 (GMT)
commit5a092ceb6b285e8377add13d460850668fd0d13c (patch)
treeb809240d61d5a152897ef124f76b4e4e4697f329 /builtin/read-tree.c
parent5165dd598a402b25301ea41fa5e0d9a72ad78393 (diff)
downloadgit-5a092ceb6b285e8377add13d460850668fd0d13c.zip
git-5a092ceb6b285e8377add13d460850668fd0d13c.tar.gz
git-5a092ceb6b285e8377add13d460850668fd0d13c.tar.bz2
read-tree: note about dropping split-index mode or index version
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/read-tree.c')
-rw-r--r--builtin/read-tree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index 3204c62..e7e1c33 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -155,6 +155,15 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
if (1 < opts.merge + opts.reset + prefix_set)
die("Which one? -m, --reset, or --prefix?");
+ /*
+ * NEEDSWORK
+ *
+ * The old index should be read anyway even if we're going to
+ * destroy all index entries because we still need to preserve
+ * certain information such as index version or split-index
+ * mode.
+ */
+
if (opts.reset || opts.merge || opts.prefix) {
if (read_cache_unmerged() && (opts.prefix || opts.merge))
die("You need to resolve your current index first");