Re: [PATCH] pretend_sha1_file(): Change return type from int to void
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 7, 2015, 17:36 UTC
- Message-ID
- <xmqqfv1mvawu.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <ef5b20ed42ea20b2891fc3998a81f339@dscho.org>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 7 quoted lines
> As to the patch, I cannot speak for Junio, of course, but my > preference would be to keep the return type. Traditionally, functions > that can fail either die() or return an int; non-zero indicates an > error. In this case, it seems that we do not have any condition > (yet...) under which an error could occur. It does not seem very > unlikely that we may eventually have such conditions, though, hence my > preference.
Accepting Tobias's patch may have a documentation value to let the callers know that the function does not give the caller any error diagnosis, and it may matter a lot if this were a very frequently used function, but that is not exactly the case here.
I do not care too deeply.