Re: [PATCH] cat-file --batch / --batch-check: do not exit if hashes are missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 "<object> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux