Re: (rework) [PATCH 3/4] Accept commit in some places when tree is needed.
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:53
quoted
quoted
quoted
quoted
"LT" == Linus Torvalds [off-list ref] writes:
LT> On Wed, 20 Apr 2005, Junio C Hamano wrote:
quoted
Sorry, but the numbering is wrong this should have been [4/5] not [3/4]. The contents should be fine, though.
LT> Applied and pushed out. Thanks. I have alreay a bugfix and a half X-<. ---------------------------------------------------------------- [PATCH] Fix read-tree-with-tree-or-commit-sha1 function. Instead of NULL to signal an error, it was returning a garbage. Also the compiler complains about a type mismatch between signed and unsigned character array. Both are my bad. Sorry. Signed-off-by: Junio C Hamano <redacted> ---
--- l/sha1_file.c 2005-04-20 19:00:38.000000000 -0700
+++ k/sha1_file.c 2005-04-20 18:14:34.000000000 -0700@@ -174,7 +174,7 @@ void *buffer; unsigned long isize; int was_commit = 0; - char tree_sha1[20]; + unsigned char tree_sha1[20]; buffer = read_sha1_file(sha1, type, &isize);
@@ -197,7 +197,7 @@ */ if (!buffer || strcmp(type, "tree")) { free(buffer); - return; + return NULL; } *size = isize;