git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Configuring a third-party git hook

From
Chris Angelico <rosuav@gmail.com>
Date
Mar 21, 2014, 17:48 UTC
Message-ID
<CAPTjJmodV0djvYJ9MWqdH4MvkrmauTJoWZFu0+RrR9ATdZBepQ@mail.gmail.com>
In-Reply-To
<xmqqha6rv4og.fsf@gitster.dls.corp.google.com>
On Sat, Mar 22, 2014 at 4:31 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Chris Angelico <rosuav@gmail.com> writes:
>
>> On Fri, Mar 21, 2014 at 2:43 PM, Jeff King <peff@peff.net> wrote:
>>> Thanks, the new text looks good to me. Please follow SubmittingPatches
>>> (notably, you need to sign-off your work, and please send patches inline
>>> rather than as attachments).
>>
>> Ah, didn't see that file.
>
> It appears that we might need to be more explicit in that file,
> though.
> [chomp specifics]

Please do. I read through the file as a set of instructions, and would have followed them if they'd been there. Fitting into a project like that is what those sorts of guides are for.

> Also I'd title the commit with the area it touches, i.e. starting it
> with "Explain blah" is suboptimal.

Interestingly, this is exactly what my hook is for! It searches for previous commits touching that file, looks for something separated off by a colon, and pre-fills the commit message with that. (If there are multiple options, they're all listed, commented out. Otherwise, it's put in without a leading hash, so I just hit the End key - I use nano for commit messages - and start typing.)

> Will queue with a minor tweak, with retitling the change and
> rephrasing the "ideally" part, which invites people to say "well it
> may be so in the ideal world but the rule does not apply to me".

Awesome. I tried to keep it brief (and the "ideally" was from the point of view of someone trying to configure someone else's tool), but explicitly talking about creating new variables makes that even clearer. Thanks.

ChrisA
Previous: Junio C HamanoNext: Jeff King
Message 9 of 14 in “Configuring a third-party git hook”
  1. Chris AngelicoMar 19, 2014
  2. KevinMar 20, 2014
  3. Chris AngelicoMar 20, 2014
  4. Jeff KingMar 20, 2014
  5. Chris AngelicoMar 20, 2014
  6. Jeff KingMar 21, 2014
  7. Chris AngelicoMar 21, 2014
  8. Junio C HamanoMar 21, 2014
  9. Chris AngelicoMar 21, 2014
  10. Jeff KingMar 21, 2014
  11. Junio C HamanoMar 21, 2014
  12. Junio C HamanoMar 21, 2014
  13. Junio C HamanoMar 20, 2014
  14. Chris AngelicoMar 20, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.