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

Re: [PATCH v3] run-command: add hint when a hook is ignored

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 11, 2017, 06:26 UTC
Message-ID
<xmqqmv4ymc7w.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqy3ojpr9f.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> Quite honestly, I do not particulary think this is confusing, and I
> expect that this change will irritate many people by forcing them to
> either set the advise config or move the ones that they deliberately
> left unexecutable by renaming them by adding ".disabled" at the end.
>
> But these remedies are easy enough, so let's see how well it works
> by merging it to 'next' and cooking it there for a while.

Well, it turns out that I am among those who are irritated, as all the repositories I work with were rather old, dating back to 2005, back when it was a norm to have these sample files installed without executable bit, to make it easy for those who choose to use them as-is to enable them by flipping the executable bit.

And I do not find the advice.ignoredhook is giving particularly a good piece of advice. I suspect that it would be a better practice to rename a disabled foo-hook to foo-hook.disabled if the user wants to squelch the warning. It gives them a final chance to review what they left disabled for all these years, and then choose to either remove it, or rename it to foo-hook.disabled. "ls .git/hooks/" will then make it clear which ones are disabled without the "-F" option, which is an additional benefit.

Anyway, I am not merging this topic to the upcoming release, so hopefully we'll hear from others who try 'next'.

Thanks.
Previous: Junio C HamanoNext: Jeff King
Message 12 of 16 in “run-command.c: add hint when hook is not executable”
  1. run-command.c: add hint when hook is not executableDamien, Oct 3, 2017
  2. Junio C HamanoOct 4, 2017
  3. DamienOct 5, 2017
  4. run-command: add hint when a hook is ignoredDamien Marié, Oct 5, 2017
  5. Junio C HamanoOct 6, 2017
  6. Junio C HamanoOct 6, 2017
  7. Junio C HamanoOct 6, 2017
  8. Junio C HamanoOct 6, 2017
  9. DamienOct 6, 2017
  10. run-command: add hint when a hook is ignoredDamien Marié, Oct 6, 2017
  11. Junio C HamanoOct 10, 2017
  12. Junio C HamanoOct 11, 2017
  13. Jeff KingJan 3, 2018
  14. Junio C HamanoJan 5, 2018
  15. Jeff KingMar 3, 2018
  16. Junio C HamanoMar 5, 2018

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.