From: Lea Wiemann Date: Mon, 09 Jun 2008 00:05:46 GMT Subject: Re: [PATCH] cat-file --batch / --batch-check: do not exit if hashes are missing Message-ID: <484C73DA.10804@gmail.com> In-Reply-To: Johannes Schindelin wrote: > Lea Wiemann wrote: >> - if (type <= 0) >> - return 1; >> + if (type <= 0) { >> + printf("%s missing\n", obj_name); >> + fflush(stdout); >> + return 0; >> + } > > Is it really intended that it returns 0 now? Yes, return 0 causes it to not exit (which is the desired effect, as in documented). > Further, should it not be an error("%s missin... instead? It is an > error, isn't it? No, it's not an error. I suggest you read git-cat-file.1 -- getting a response of " missing" (rather than cat-file terminating) if you pass in a non-existent object is the desired behavior, and it happened before for named objects, like "HEAD", but not for full hashes. Now it also happens for full hashes. -- Lea