X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=update-index.c;h=797245ab276543edc5d7605b57f5175278436234;hb=4c61b7d15a6215fa4dffa33c37c3ef9df80d3f67;hp=ce1db38d16928d8b5085cb6e177f40fff9a978cf;hpb=07e8ab9be913bd50595707f21a896ac15c4f5a89;p=git.git diff --git a/update-index.c b/update-index.c index ce1db38d..797245ab 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;