]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - gitconfig.m4
gitconfig: Update alias rp to run in parallel.
[config/dotfiles.git] / gitconfig.m4
index 451951049df82d3d29a7d74e5faf91a4bf8e6c69..fc38d37a9c1ac4b1d12ae1ed6f8d066ecd529b8e 100644 (file)
@@ -82,10 +82,20 @@ include(../lib.m4)
        t   = tag
        p   = push
        pu  = push
-       ru  = remote update
+       # Parallel git remote update. Also strips unnecessary output.
+       ru = "! git remote \
+             | xargs -d '\\n' -n1 -P0 git remote update 2>&1 \
+             | sed '/^$/d; \
+                    /^Please make sure you have the correct access rights$/d; \
+                    /^and the repository exists\\.$/d;'"
        # Push to all remotes. Thanks to albel727 in #git on Freenode
-       # (2011-06-04 16:06 CEST) for the idea.
-       rp = ! git remote | xargs -L1 -I{} git push {}
+       # (2011-06-04 16:06 CEST) for the idea. Modified to push in parallel
+       # and to strip unnecessary output.
+       rp = "! git remote \
+             | xargs -d '\\n' -n1 -P0 git push 2>&1 \
+             | sed '/^$/d; \
+                    /^Please make sure you have the correct access rights$/d; \
+                    /^and the repository exists\\.$/d;'"
        ## Patches.
        fp  = format-patch
        ## Maintenance.