gitconfig: Colouring configuration.
[profile] / gitconfig
index 3d2a12c..687ff9e 100644 (file)
--- a/gitconfig
+++ b/gitconfig
@@ -27,6 +27,8 @@
        diff = auto
        status = auto
        branch = auto
+       interactive = auto
+       grep = auto
 
 [color "diff"]
        plain = normal
        commit = bold yellow
        whitespace = reverse red
 
+[color "interactive"]
+        prompt = bold yellow
+        header = bold
+        help = green
+        error = bold red
+
 [color "status"]
        header = bold
        added = bold green
@@ -47,6 +55,9 @@
        local = normal
        remote = cyan
 
+[color "grep"]
+       external = --color=always
+
 [alias]
        egrep = "grep -E"
        patch = "format-patch -o p -s"
                        --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