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

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

 



Stefan Beller <sbeller@xxxxxxxxxx> writes:

> Compare to a patch[1] I sent a while back and the discussion on it.
>
> [1] https://www.mail-archive.com/git@xxxxxxxxxxxxxxx/msg70474.html

It is not clear what conclusion you want others to draw from the
comparison, I am afraid.

I am guessing that you are in favor of dropping this patch, because
'int' that signals success or error is the most natural return type
and meanint for this function if its callers ever start using the
value as the indication of an error, just like in the old thread,
the return value from get_remote_heads() had the most useful type
and the meaning for its callers if they wanted to use it.

And if that is what you wanted to say, I fully agree with the
conclusion.

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.  So in that sense, the patch in this
thread to change the return value to void is a bit more justifiable
than the one in the old thread, I think.

Thanks.
--
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]