... and some git scripts...

This commit is contained in:
2017-10-14 11:15:53 +02:00
parent d8ac370852
commit 5749a9fc07
3 changed files with 118 additions and 0 deletions

19
bin/git-on-tree Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
start_rev=$1
end_rev=$2
cmd=$3
function main()
{
revs=`git rev-list --reverse ${start_rev}..${end_rev}`
for rev in $revs; do
git checkout --quiet $rev
eval $cmd
git reset --hard --quiet
done
git checkout ${end_rev}
}
main "$@"