This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Git hooks
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Gerald Pfeifer <gerald at pfeifer dot com>
- Cc: Jason Merrill <jason at redhat dot com>, <gcc at gcc dot gnu dot org>, <brobecker at adacore dot com>, Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>, Daniel Berlin <dberlin at dberlin dot org>
- Date: Mon, 16 Sep 2019 20:02:11 +0000
- Subject: Re: GCC Git hooks
- Ironport-sdr: fzH9AMuCVpUB3xXPEJSQ9LNFxZbWskcRaQdwOlb2SOOobIsAl32FIVvuFY4K4kSZrGyjc6Smeb C798IwfNal2fdBow3RsTR8THLF8/0bF9IcYoCjREz6ThxIGxOypWhmmCyMQkyNDW/WX4MhA8Pg NUgxC+WtXuJnLKLMvYmHOj/xgE18IQvjgZVO45GY30m7CJ1kBKoJSt5cQDmcZvSpl7kTPoYLCD B6XZEO+M+DtAdo5sRM9zwGE18WcPYgnThc6tENvlGw8prPBRvgvLOWYQN66WTYZs7ifWgrHwJI RLU=
- Ironport-sdr: HIdUKyh99ItEaO2w0meGVSB8OHrjFX0H6xsMAEEsLBVKyJwNhxTh3oCiEt2ySypg9pWWV4KkLL b5ERzXJHYhchJql1l8hXH7t3Dsc2Az0606v9d/3IdmD+fsHR0DdrkK3qlVb9ulQVJWg/R1LnYp ps5ltHSS1zx0N4LVEimzocuJvIe/r3aEPfOsD0S/2CaBC24x6bluOIMw38bpHVNWIPjDh5QiJi TdFPADx4Eo+wTiymoRPyzhtDCzP7b0jm3Dy736aMvLSob4OmFFS3yZEKl8Kmj17x2qQcVN+v+M Gpo=
- References: <CADzB+2mqKfG2iEfHZXsv5qJ_U8NQ-cGTgvGRgPWi-5mj3Hot_A@mail.gmail.com> <alpine.LSU.2.21.1909151143420.8294@anthias.pfeifer.com> <alpine.DEB.2.21.1909151205100.19246@digraph.polyomino.org.uk> <alpine.LSU.2.21.1909160013420.8294@anthias.pfeifer.com>
On Mon, 16 Sep 2019, Gerald Pfeifer wrote:
> On the latter, let's just flip the switch whenever you're ready, and I'll
> see to adjust my script within a day or two and manually perform checks
> until that's done. (If you can create a sample e-mail notification for
> me, I'll use that to start looking into it.)
The email notifications are the part most likely to change substantially
at various points after the initial git conversion. The post-receive hook
I sent uses post-receive-email as something easy to set up, but I fully
expect we might end up using the AdaCore hooks for the wwwdocs repository
as well as for the GCC sources, with some suitable configuration that is
mostly the same between the repositories.
I don't recommend using the emails to extract any metadata about the
commits because the formatting of that information is likely to change.
Rather, I suggest using the emails only as a signal that something has
been pushed to the repository. You can then e.g. use "git rev-parse HEAD"
before and after updating the local checkout to see what the old and new
HEAD commits were, and "git diff --name-only" to list the modified, new or
removed files (as in the posted hook). If you want to extract information
about individual new commits (e.g. authors) then "git rev-list
$old_HEAD..$new_HEAD" can be used to list the new commits present in
$new_HEAD but not in $old_HEAD.
--
Joseph S. Myers
joseph@codesourcery.com