* Suggestion and question about hooks
@ 2023-02-12 18:09 Renato Ramos Ribeiro Araujo
2023-02-12 23:40 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Renato Ramos Ribeiro Araujo @ 2023-02-12 18:09 UTC (permalink / raw)
To: git
Why git does not have a hook 'post-push'?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Suggestion and question about hooks
2023-02-12 18:09 Suggestion and question about hooks Renato Ramos Ribeiro Araujo
@ 2023-02-12 23:40 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2023-02-12 23:40 UTC (permalink / raw)
To: Renato Ramos Ribeiro Araujo; +Cc: git
Renato Ramos Ribeiro Araujo <renatorraraujo@gmail.com> writes:
> Why git does not have a hook 'post-push'?
You may want to look for "(five) valid reasons to have hook" in the
list archive.
It depends on what it does, but if it always runs after user does
"git push", or it always runs if "git push" finishes without an
error, then such a customization does not deserve to be a hook.
$ cat >$HOME/bin/git-mypush <<-\EOF
#!/bin/sh
git push "$@" && {
... write whatever your post-push would do here ...
}
EOF
would work just fine without any change to git itself.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-12 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12 18:09 Suggestion and question about hooks Renato Ramos Ribeiro Araujo
2023-02-12 23:40 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).