From: Tobias Klauser <tklauser@distanz.ch>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] pretend_sha1_file(): Change return type from int to void
Date: Tue, 6 Oct 2015 15:51:01 +0200 [thread overview]
Message-ID: <20151006135101.GA11304@distanz.ch> (raw)
In-Reply-To: <632cbcf1dc9fa45ce71693a2cfae73e4@dscho.org>
Hi Johannes
Thanks for your feedback.
On 2015-10-06 at 15:16:12 +0200, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:
> Hi Tobias,
>
> On 2015-10-06 14:15, Tobias Klauser wrote:
> > prented_sha1_file() always returns 0 and its only callsite in
> > builtin/blame.c doesn't use the return value, so change the return type
> > to void.
>
> While this commit message is technically correct, it would appear that there are some things left unsaid.
>
> Is there a problem with the current code that is solved by not returning 0? If so, could you add it to the commit message? And in particular, change the oneline appropriately?
There's no problem with the current code other than that the return
value is unused and thus unnecessary for correct funcionality. So it's
certainly not a functional problem but rather a cosmetic change.
Does such a change even make sense (it's one of my first patch to git,
so I'm not really sure what your criteria in this respect are)?
If yes, would something like the following bring across the intention
more clearly?
pretend_sha1_file() always returns 0 and its only user in
builtin/blame.c doesn't use the returned value. Thus, the return value
is unnecessary and the return type of pretend_sha1_file() can be
changed to void.
Cheers
Tobias
next prev parent reply other threads:[~2015-10-06 14:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 12:15 [PATCH] pretend_sha1_file(): Change return type from int to void Tobias Klauser
2015-10-06 13:16 ` Johannes Schindelin
2015-10-06 13:51 ` Tobias Klauser [this message]
2015-10-06 14:30 ` Johannes Schindelin
2015-10-07 8:13 ` Tobias Klauser
2015-10-07 17:36 ` Junio C Hamano
2015-10-07 20:42 ` Stefan Beller
2015-10-07 21:14 ` Junio C Hamano
2015-10-07 21:24 ` Stefan Beller
2015-10-07 21:29 ` Junio C Hamano
2015-10-07 21:22 ` Junio C Hamano
2015-10-08 7:45 ` Tobias Klauser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151006135101.GA11304@distanz.ch \
--to=tklauser@distanz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).