chiark / gitweb /
git-workflows: apropos smcv comments
[dgit-junk.git] / swap-pseudomerges
1 #!/bin/sh
2 #
3 # runs
4 #   git-filter-branch --some-filters "$@"
5
6 set -e
7
8 git-filter-branch --parent-filter '
9         case "$(git cat-file commit $GIT_COMMIT)" in
10         *"git-debrebase pseudomerge"*)
11                 perl -ne '\''
12                         chomp;
13                         print join " ", reverse split / +(?=-p )/;
14                         print "\n";
15                 '\''
16                 ;;
17         *)
18                 cat
19         esac
20 ' "$@"