Skip to content

Commit 5a092ce

Browse files
pcloudsgitster
authored andcommitted
read-tree: note about dropping split-index mode or index version
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5165dd5 commit 5a092ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

builtin/read-tree.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
155155
if (1 < opts.merge + opts.reset + prefix_set)
156156
die("Which one? -m, --reset, or --prefix?");
157157

158+
/*
159+
* NEEDSWORK
160+
*
161+
* The old index should be read anyway even if we're going to
162+
* destroy all index entries because we still need to preserve
163+
* certain information such as index version or split-index
164+
* mode.
165+
*/
166+
158167
if (opts.reset || opts.merge || opts.prefix) {
159168
if (read_cache_unmerged() && (opts.prefix || opts.merge))
160169
die("You need to resolve your current index first");

0 commit comments

Comments
 (0)