aboutsummaryrefslogtreecommitdiff
path: root/update-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'update-index.c')
-rw-r--r--update-index.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/update-index.c b/update-index.c
index ce1db38d1..797245ab2 100644
--- a/update-index.c
+++ b/update-index.c
@@ -577,9 +577,11 @@ int main(int argc, const char **argv)
break;
}
if (!strcmp(path, "--index-info")) {
+ if (i != argc - 1)
+ die("--index-info must be at the end");
allow_add = allow_replace = allow_remove = 1;
read_index_info(line_termination);
- continue;
+ break;
}
if (!strcmp(path, "--ignore-missing")) {
not_new = 1;