This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Git hooks


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]