]> git.neil.brown.name Git - wiggle.git/commitdiff
Add export option to p
authorNeil Brown <neilb@suse.de>
Tue, 13 Jun 2006 12:57:14 +0000 (22:57 +1000)
committerNeil Brown <neilb@suse.de>
Tue, 13 Jun 2006 12:57:14 +0000 (22:57 +1000)
This is a preliminary attempt at git integration.

Signed-off-by: Neil Brown <neilb@suse.de>
p

diff --git a/p b/p
index 923bc478e0df354a87b479a98ca1fe4ee5d030a0..fe71a72db6fee10fdd7b201cd2ee70b9e5e23912 100755 (executable)
--- 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
        ;;