#!/usr/bin/ruby # Executed like the following to trim off pointless commits (including merge commits) # that doesn't change the tree # git filter-branch -f --commit-filter '~/ws/jenkins/split2/helper.rb "$@"' HEAD # # parameters are " [ -p ]*" and is the same as git commit-tree # system "echo executing #{ARGV.join(' ')} >> /tmp/log" # extract parents parents=[] i=2 while i> /tmp/log" exec "git commit-tree #{args.join(' ')}" else # system "echo skipping >> /tmp/log" # otherwise don't create this as a commit puts parents end