From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: "Øystein Walle" <oystwa@gmail•com>, git@vger•kernel.org
Subject: Re: [PATCH 0/2] pre-commit hook updates
Date: Wed, 26 Nov 2014 10:35:22 -0800 [thread overview]
Message-ID: <xmqqfvd5res5.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20141126045246.GD15252@peff.net> (Jeff King's message of "Tue, 25 Nov 2014 23:52:46 -0500")
Jeff King <peff@peff•net> writes:
> On Tue, Nov 25, 2014 at 11:51:27PM +0100, Øystein Walle wrote:
>
>> I agree with Junio Hamano that it's better to provide no argument at all
>> rather than an empty one. I also agree with Jeff King that "noamend" is
>> better than an empty argument. I went with the second one since Jeff
>> seemed to get the last word :)
>
> I am not sure the last word counts for much. :) We'll see if Junio
> responds (there, or to your patch). I do not feel _too_ strongly either
> way, and I don't have much else to say besides what was said.
I _think_ "give only info that is necessary" is cleaner as an
interface in theory, but have two niggles myself:
1. the hooks must do the "argument parsing" loop (you already
mentioned this);
2. the hooks cannot tell if the lack of "amending" argument is
because the version of Git predates that "amending" hint
support, or because the user action is a straight "commit" not
an "commit --amend".
In any case, I do not have strong preference myself.
next prev parent reply other threads:[~2014-11-26 18:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 22:51 [PATCH 0/2] pre-commit hook updates Øystein Walle
[not found] ` <cover.1416955873.git.oystwa@gmail.com>
2014-11-25 22:51 ` [PATCH 1/2] t7503: use write_script to generate hook scripts Øystein Walle
2014-11-26 1:25 ` Eric Sunshine
2014-11-26 4:51 ` Jeff King
2014-11-26 18:12 ` Junio C Hamano
2014-11-26 19:03 ` Jeff King
2014-11-26 20:07 ` Junio C Hamano
2014-11-25 22:51 ` [PATCH 2/2] commit: inform pre-commit that --amend was used Øystein Walle
2014-11-26 1:36 ` Eric Sunshine
2014-11-26 1:32 ` [PATCH 0/2] pre-commit hook updates Eric Sunshine
2014-11-26 4:52 ` Jeff King
2014-11-26 18:35 ` Junio C Hamano [this message]
2014-11-26 18:56 ` Jeff King
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=xmqqfvd5res5.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=oystwa@gmail$(echo .)com \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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