From: Junio C Hamano Date: Sun, 8 May 2005 22:31:33 +0000 (-0700) Subject: Fix git-update-cache --cacheinfo error message. X-Git-Tag: v0.99~603^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b3f94c4b554cd6c3db3e99dc33bdac7d8155d606;p=git.git 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 --- diff --git a/update-cache.c b/update-cache.c index 69b1afec9..2f5d620fd 100644 --- a/update-cache.c +++ b/update-cache.c @@ -369,8 +369,10 @@ int main(int argc, char **argv) continue; } 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 "); + if (add_cacheinfo(argv[i+1], argv[i+2], argv[i+3])) + die("update-cache: --cacheinfo cannot add %s", argv[i+3]); i += 3; continue; }