chiark / gitweb /
unstg
authorMark Wooding <mdw@distorted.org.uk>
Sat, 27 Dec 2008 13:27:02 +0000 (13:27 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 27 Dec 2008 13:27:02 +0000 (13:27 +0000)
gitconfig

index 3d2a12ce4c81adfbf7fa15ff97dce34533bc794e..8f26980459e5e83e47df20873e61bbfc3a2ec2d0 100644 (file)
--- a/gitconfig
+++ b/gitconfig
                        --no-signed-off-by-cc \
                        --to"
        files = "ls-files --exclude-standard"
+       unstg = !"sh -e -c ' \
+               : ${GIT_DIR=$(git rev-parse --git-dir)}; \
+               if [ $# -eq 0 ]; then set -- \"$(stg branch)\"; fi; \
+               for branch; do \
+                 rmdir \"$GIT_DIR/patches/$branch/patches\"; \
+                 rm -rf \"$GIT_DIR/patches/$branch\"; \
+                 git for-each-ref -s \
+                   --format \"git update-ref -d %(refname) %(objectname)\" \
+                   \"refs/patches/$branch\" \"refs/bases/$branch\" | \
+                   sh -e; \
+               done' unstg"
 
 [stgit]
        autoresolved = yes