{"thread":{"id":"59232","subject":"Suggestion and question about hooks","startedAt":"2023-02-12T18:11:09Z","lastAt":"2023-02-12T23:40:41Z","messageCount":2,"participants":["Renato Ramos Ribeiro Araujo","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"471996","messageId":"Y+krdsIPhKIxFRHt@zosoarch","threadId":"59232","inReplyTo":null,"subject":"Suggestion and question about hooks","fromName":"Renato Ramos Ribeiro Araujo","fromEmail":"renatorraraujo@gmail.com","sentAt":"2023-02-12T18:09:58Z","receivedAt":"2023-02-12T18:11:09Z","isPatch":false,"sender":{"key":"renatorraraujo@gmail.com","avatar":null},"body":"Why git does not have a hook 'post-push'?\n"},{"id":"471997","messageId":"xmqqzg9icv0u.fsf@gitster.g","threadId":"59232","inReplyTo":"Y+krdsIPhKIxFRHt@zosoarch","subject":"Re: Suggestion and question about hooks","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-02-12T23:40:33Z","receivedAt":"2023-02-12T23:40:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Renato Ramos Ribeiro Araujo <renatorraraujo@gmail.com> writes:\n\n> Why git does not have a hook 'post-push'?\n\nYou may want to look for \"(five) valid reasons to have hook\" in the\nlist archive.\n\nIt depends on what it does, but if it always runs after user does\n\"git push\", or it always runs if \"git push\" finishes without an\nerror, then such a customization does not deserve to be a hook.\n\n\t$ cat >$HOME/bin/git-mypush <<-\\EOF\n\t#!/bin/sh\n\tgit push \"$@\" && {\n\t\t... write whatever your post-push would do here ...\n\t}\n\tEOF\n\nwould work just fine without any change to git itself.\n"}]}