]> snippets.scripts.mit.edu Git - Scripts/git/.git/commitdiff
git-hooks/zephyr-post-receive: Use --first-parent when listing commits.
authorGeoffrey Thomas <geofft@mit.edu>
Sat, 12 Sep 2009 19:29:40 +0000 (15:29 -0400)
committerGeoffrey Thomas <geofft@mit.edu>
Sat, 12 Sep 2009 19:29:40 +0000 (15:29 -0400)
This avoids zephyring the history of a merged-in branch, and just
zephyrs the merge commit itself.

Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
git-hooks/zephyr-post-receive

index 48534d0ad48ca9e7549095eacae661e8aa3f3512..bd06fe45edadd62440ec867ec59f9505110451de 100755 (executable)
@@ -31,7 +31,7 @@ while read oldrev newrev refname; do
       -m "New branch created."
     continue
   fi
-  git rev-list --reverse "$oldrev..$newrev" | while read rev; do
+  git rev-list --first-parent --reverse "$oldrev..$newrev" | while read rev; do
     shortrev=`git log -1 --pretty=format:%h "$rev"`
     (git show --stat $usecolor "$rev" |
      sed -e 's/@/@@/g' \