Re: [PATCH v2 6/6] sha1_loose_object_info: do not complain out loud on non-existent objects

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 6/6] sha1_loose_object_info: do not complain out loud on non-existent objects

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:53

Nguyen Thai Ngoc Duy [off-list ref] writes:
On Wed, May 23, 2012 at 9:09 PM, Nguyễn Thái Ngọc Duy [off-list ref] wrote:
quoted
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
makes sense to me, but I might have overlooked something
while it's still making sense for me, i think it's more logical  to
move the check to the caller, where "entry in pack?" check is also
done.
I think most of the callers of sha1_object_info_extended() are using this
function, saying "We expect this object to exist somewhere, perhaps in
pack or perhaps in a loose form, and trying to see what it is", and they
rely on the first error message "unable to find" to be issued.

So in that sense, I do not see how this patch makes any sense at all.
Care to point out a codepath where we throw a random 20 bytes at it in
order to see if an object with the given object name exists?  That would
be the only case where "unable to find" might be an unwanted error
message.

Re: [PATCH v2 6/6] sha1_loose_object_info: do not complain out loud on non-existent objects

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:53:53

On Wed, May 23, 2012 at 11:01 PM, Junio C Hamano [off-list ref] wrote:
quoted
while it's still making sense for me, i think it's more logical  to
move the check to the caller, where "entry in pack?" check is also
done.
I think most of the callers of sha1_object_info_extended() are using this
function, saying "We expect this object to exist somewhere, perhaps in
pack or perhaps in a loose form, and trying to see what it is", and they
rely on the first error message "unable to find" to be issued.
hmm.. if you see it from that angle, yes it makes sense
So in that sense, I do not see how this patch makes any sense at all.
Care to point out a codepath where we throw a random 20 bytes at it in
order to see if an object with the given object name exists?  That would
be the only case where "unable to find" might be an unwanted error
message.
packed_delta_info(), fast-import (I think) and cat-file do not check
for object existence before calling this.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help