The existing merge-check asks "are there any merge commits"? The
negation of the answer to that question is not necessarily the answer
to "are there any non-merge commits".
(Hint: when you have both types of commits in a push, both questions
have "yes" as the answer. Basic boolean logic... if you can't get
this you should not be a developer).
Now let's get specific. The merge check works by checking if this command:
git rev-list -n 1 --merges $oldsha..$newsha
produces any output (empty => no merge pushes, non-empty => some merge push).
You might think you'll use "--no-merges" there, but I suspect that
will not be sufficient. You probably need to add --first-parent to it
(I am guessing here).
Do that, test it thoroughly, satisfy yourself that you have a shell
command whose output (or lack of) can be used to determine what you
want.
Then take src/VREF/MERGE-CHECK as a model and roll your own
NO-MERGE-CHECK script, replacing the command (in line 46, at present,
on v3.x) with the command you tested.
Finally, let me be very specific that you do not need my help to do
this, and you do not need any changes to gitolite to do this.
--
Sitaram