Fix git hook to avoid the shell misinterpreting ^revision as a glob
[chef.git] / cookbooks / git / templates / default / post-receive.erb
index 52075a0176805b707ac4ae4c525fb84418d51fc4..30ade27191aff5343ed8667aed81d359db7b528d 100644 (file)
@@ -6,7 +6,7 @@ while read oldrev newrev refname
 do
   if [[ "$refname" = "refs/heads/master" ]]
   then
-    for rev in $(git rev-list ${newrev} ^${oldrev})
+    for rev in $(git rev-list ${oldrev}..${newrev})
     do
       sudo -u trac /usr/bin/trac-admin /var/lib/trac changeset added "<%= @repository %>" "${rev}"
     done