From: Tobias Klauser <tklauser@distanz.ch>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] branch: remove unused parameter to create_branch()
Date: Fri, 4 Nov 2016 17:52:43 +0100 [thread overview]
Message-ID: <20161104165236.GC819@distanz.ch> (raw)
In-Reply-To: <20161104163012.5r3uivnub3bdkqgr@sigill.intra.peff.net>
On 2016-11-04 at 17:30:12 +0100, Jeff King <peff@peff.net> wrote:
> On Fri, Nov 04, 2016 at 04:19:49PM +0100, Tobias Klauser wrote:
>
> > The name parameter to create_branch() has been unused since commit
> > 55c4a673070f ("Prevent force-updating of the current branch"). Remove
> > the parameter and adjust the callers accordingly. Also remove the
> > parameter from the function's documentation comment.
>
> This seemed eerily familiar, and it turns out I wrote this as a
> preparatory step for a different topic a while back, but never finished
> it.
>
> So clearly a good change, though we might want to explain a bit more why
> it's correct that the parameter is unused. Here's what I wrote:
>
> This function used to have the caller pass in the current value of
> HEAD, in order to make sure we didn't clobber HEAD. In 55c4a6730,
> that logic moved to validate_new_branchname(), which just resolves
> HEAD itself. The parameter to create_branch is now unused.
Ah, I didn't know about the history of this parameter. It clearly makes
sense to explain this in the patch description.
> I also ended up reformatting the documentation comment, but that's
> purely optional. My patch is below for reference. Feel free to grab any
> bits of it that you agree with.
I like your documentation comment much better as IMO it's easier to read
and to identify the individual parameters.
Given these facts, I guess it's better if my patch is dropped and yours
is applied instead :)
Thanks a lot!
prev parent reply other threads:[~2016-11-04 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 15:19 [PATCH] branch: remove unused parameter to create_branch() Tobias Klauser
2016-11-04 16:30 ` Jeff King
2016-11-04 16:52 ` Tobias Klauser [this message]
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=20161104165236.GC819@distanz.ch \
--to=tklauser@distanz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).