RFC: using AdaCore's git hooks for binutils-gdb.git ...

Joel Brobecker brobecker@adacore.com
Fri Nov 28 14:27:00 GMT 2014

> >   - Allow the use of specific policies on a per-branch basis
> >     (ie - reject merges in release branches, for instance).
> >
> > Our scripts also correctly handle new references (new tags, new
> > branches), as well as git notes. It is also Gerrit-ready,
> Does it handle removing a branch
> # git push origin :foo
> I used to get some extra messages.

Yes, you get an email notifying you of the branch being deleted,
and what commit the branch was pointing to before the removal
of that branch. In addition, if any commits are "lost" (no longer
accessible from any remaining branch or other reference), then
a list of the commits that are no longer on any branch is included
as well.

Here is an example of what you'd get in the simple case:

| From: Test Suite <testsuite@adacore.com>
| To: git-hooks-ci@example.com
| Subject: [repo] Deleted branch old-branch
| X-Act-Checkin: repo
| X-Git-Author: Test Suite <testsuite@adacore.com>
| X-Git-Refname: refs/heads/old-branch
| X-Git-Oldrev: cc8d2c2637bda27f0bc2125181dd2f8534d16222
| X-Git-Newrev: 0000000000000000000000000000000000000000
| The branch 'old-branch' was deleted.
| It previously pointed to:
|  cc8d2c2... Modify `c', delete `b'.

> Do we need to show the whole diff in the commit email?  I think
> a commit URL should be sufficient.  Binutils-gdb commit
> can have a very large commit diff due to generated files.

No such option is available at the moment.

Personally, I wouldn't like having a URL, at least not instead
of a diff.  I think having a diff is much more useful and immediate,
as I use those as a chance to review post commit as well, or verify
that what's committed is what was discussed on the list.

But for large commits, there is a limit to the maximum size of
the email, after which the email is truncated.


More information about the Binutils mailing list