Code

documentation: replace Discussion section by link to user-manual chapter
[git.git] / git-filter-branch.sh
index 3b041d81efd7e96a49c40eba0e23fc0b18508c82..a4b6577bd496819232754c1275b7c1e798b0470c 100755 (executable)
@@ -23,6 +23,20 @@ map()
        fi
 }
 
+# if you run 'skip_commit "$@"' in a commit filter, it will print
+# the (mapped) parents, effectively skipping the commit.
+
+skip_commit()
+{
+       shift;
+       while [ -n "$1" ];
+       do
+               shift;
+               map "$1";
+               shift;
+       done;
+}
+
 # override die(): this version puts in an extra line break, so that
 # the progress is still visible