git/contrib/hooks
Pat Notz e5f5050ed1 Fix contrib/hooks/post-receive-email for new duplicate branch
In the show_new_revisions function, the original code:

  git rev-parse --not --branches | grep -v $(git rev-parse $refname) |

isn't quite right since one can create a new branch and push it
without any new commits.  In that case, two refs will have the same
sha1 but both would get filtered by the 'grep'.  In the end, we'll
show ALL the history which is not what we want.  Instead, we should
list the branches by name and remove the branch being updated and THEN
pass that list through rev-parse.

Revised as suggested by Jakub Narebski and Junio C Hamano to use
git-for-each-ref instead of git-branch.  (Thanks!)

Signed-off-by: Pat Notz <pknotz@sandia.gov>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-11 10:38:53 -08:00
..
post-receive-email Fix contrib/hooks/post-receive-email for new duplicate branch 2009-02-11 10:38:53 -08:00
pre-auto-gc-battery Add Linux PPC support to the pre-auto-gc example hook 2008-10-14 16:50:09 -07:00
setgitperms.perl Use dashless git commands in setgitperms.perl 2008-09-22 09:36:12 -07:00
update-paranoid Ignore no-op changes in paranoid update hook 2008-05-25 20:29:30 -07:00