Removed old branches from git-push-all.sh
[barry.git] / git-patch-cvs.sh
blob17345c084898c5031ffe4ed4354f749682d7570c
1 #!/bin/sh
3 if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
4 echo "Apply unpushed changes from git to a CVS tree."
5 echo
6 echo "Usage: git-patch-cvs <git-upstream> <git-head> <cvs-working-dir>"
7 echo
8 echo "Example: assuming changes on master branch, with remote as"
9 echo " origin/master, patching cvs in ../barry3"
10 echo
11 echo " git-patch-cvs origin master ../barry3"
12 echo
13 echo "This script does NOT push changes to git remote."
14 echo
15 exit 1
18 git cherry "$1" "$2" | \
19 sed -n 's/^+ //p' | \
20 xargs -L 1 git cvsexportcommit -cvp -w "$3"