Subject: Re: [PATCH] pretend_sha1_file(): Change return type from int to void

From: Junio C Hamano <[email-masked]>
Date: Wed, 07 Oct 2015 14:29:31 -0700

Stefan Beller <[email-masked]> writes:

>> By the way, it is not a very good comparison, though.  The patch in
>> the old thread deliberately attempted to discard a useful piece of
>> information.  The information the patch in this thread attempts to
>> discard is not so useful, as there currently is nobody that returns
>> an error in the codepath.
>
> Isn't that a bit picky? (old thread: the information is useful, but
> nobody uses it,
> this thread: information is useless, and nobody uses it)
>
> So the similarity is nobody is using the result, the difference is the
> usefulness of
> the information provided.

Exactly.  Why is it picky?

The amount of work in the existing code that is discarded is the
amount of work it will take when somebody wants to resurrect the
compuation of that useful information.  When you judge pros and cons
for a patch that discards existing code, you would need to take both
into account---the cost of carrying it and the future cost of having
to resurrect it.