Fix git-update-cache --cacheinfo error message.
The error detection logic was too lazy to distinguish parameter error and unable-to-add case. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
03ea280249
commit
b3f94c4b55
@ -369,8 +369,10 @@ int main(int argc, char **argv)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!strcmp(path, "--cacheinfo")) {
|
if (!strcmp(path, "--cacheinfo")) {
|
||||||
if (i+3 >= argc || add_cacheinfo(argv[i+1], argv[i+2], argv[i+3]))
|
if (i+3 >= argc)
|
||||||
die("update-cache: --cacheinfo <mode> <sha1> <path>");
|
die("update-cache: --cacheinfo <mode> <sha1> <path>");
|
||||||
|
if (add_cacheinfo(argv[i+1], argv[i+2], argv[i+3]))
|
||||||
|
die("update-cache: --cacheinfo cannot add %s", argv[i+3]);
|
||||||
i += 3;
|
i += 3;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user