From: Junio C Hamano <gitster@pobox.com>
To: Renato Ramos Ribeiro Araujo <renatorraraujo@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Suggestion and question about hooks
Date: Sun, 12 Feb 2023 15:40:33 -0800 [thread overview]
Message-ID: <xmqqzg9icv0u.fsf@gitster.g> (raw)
In-Reply-To: <Y+krdsIPhKIxFRHt@zosoarch> (Renato Ramos Ribeiro Araujo's message of "Sun, 12 Feb 2023 15:09:58 -0300")
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.
prev parent reply other threads:[~2023-02-12 23:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-12 18:09 Suggestion and question about hooks Renato Ramos Ribeiro Araujo
2023-02-12 23:40 ` Junio C Hamano [this message]
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=xmqqzg9icv0u.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=renatorraraujo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).