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 10, 2017, 04:21 UTC
Message-ID
<xmqqy3ojpr9f.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<0102015ef0ba0273-ed29c030-7cdc-4535-a411-6cc443bd5f43-000000@eu-west-1.amazonses.com>
Damien Marié <damien@dam.io> writes:
> When an hook is present but the file is not set as executable then git will
> ignore the hook.
> For now this is silent which can be confusing.

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.

I've spotted two issues during the last-minute scan; I'll squash the fixes in in the meantime (if you are not going to change anything other than these two, there is no need to resend corrected patches).

Show 11 quoted lines
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 1ac0ae6adb046..9abca499f725c 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -351,6 +351,9 @@ advice.*::
>  	addEmbeddedRepo::
>  		Advice on what to do when you've accidentally added one
>  		git repo inside of another.
> +	ignoredHook::
> +		Advice shown if an hook is ignored because the it's not
> +		set as executable.
s/the it's not/the hook is not/;
Show 5 quoted lines
> @@ -38,6 +39,7 @@ static struct {
>  	{ "objectnamewarning", &advice_object_name_warning },
>  	{ "rmhints", &advice_rm_hints },
>  	{ "addembeddedrepo", &advice_add_embedded_repo },
> +	{ "ignoredhook", &advice_ignored_hook},
s/ignored_hook/& /;
Previous: Damien MariéNext: Junio C Hamano
Message 11 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.