From: Neil Brown Date: Tue, 13 Jun 2006 12:57:14 +0000 (+1000) Subject: Add export option to p X-Git-Tag: v0.7~12 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=7c2207f4745b3f865c163689954bb596e3259aab;p=wiggle.git Add export option to p This is a preliminary attempt at git integration. Signed-off-by: Neil Brown --- diff --git a/p b/p index 923bc47..fe71a72 100755 --- a/p +++ b/p @@ -902,6 +902,25 @@ case $cmd in done > .patches/resolving ;; + + export ) + # there must be only one patch. We + # git commit, p commit, p rebase + if [ -n `ls .patches/applied` ] + then + echo 'Cannot export when there are applied patches' + exit 1; + fi + make_diff + if [ -s .patches/patch ] + then + # Ok, go for it. + git add `cat .patches/files` + git commit -a -F .patches/notes + $0 commit + $0 rebase + fi + ;; pull ) cd .patches/SOURCE && bk pull ;;