From f727998817f5473acaa9d6806319bf7e812dc2e1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 14 Jan 2017 20:00:45 -0500 Subject: Rename scripts --- commit-remove-pointless-commit | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 commit-remove-pointless-commit (limited to 'commit-remove-pointless-commit') diff --git a/commit-remove-pointless-commit b/commit-remove-pointless-commit new file mode 100755 index 0000000..ba33522 --- /dev/null +++ b/commit-remove-pointless-commit @@ -0,0 +1,52 @@ +#!/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 + + -- cgit v1.2.3-54-g00ecf