summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohsuke Kawaguchi <kk@kohsuke.org>2012-05-29 15:03:26 -0700
committerKohsuke Kawaguchi <kk@kohsuke.org>2012-05-29 15:03:26 -0700
commit101b4b2920bed595f91b8f2bf07b8b044134d055 (patch)
treecd0b5cb511291113de2f75e96380b577e72de2ff
parent5256259f8475a8cd28b9d0ad65e348c7a2261010 (diff)
adding notes
-rw-r--r--git-filter-branch-magic.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-filter-branch-magic.txt b/git-filter-branch-magic.txt
new file mode 100644
index 0000000..8fbd83f
--- /dev/null
+++ b/git-filter-branch-magic.txt
@@ -0,0 +1,11 @@
+find . -name .git -prune -o -type d -o -print | grep -v Ant | grep -v ant | xargs rm -f
+
+# TODO: need to generalize the filtering logic
+# git update-index generates no index file if stdin is empty
+# this also reduces empty commits as much as possible
+# "ant\|Ant"
+git filter-branch -f --prune-empty --msg-filter ~/ws/git-filter-branch-tools/record-original-commit.sh --index-filter 'git ls-files -s | grep "Javadoc\|javadoc" | GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && ((test -f $GIT_INDEX_FILE.new && mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE) || rm -f $GIT_INDEX_FILE)' HEAD
+
+# remove all the other pointless merges
+git filter-branch -f --commit-filter "~/ws/git-filter-branch-tools/remove-pointless-commit.rb \"\$@\"" HEAD
+