]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - gitconfig.m4
gitconfig: Update alias ru to run updates in parallel.
[config/dotfiles.git] / gitconfig.m4
index 451951049df82d3d29a7d74e5faf91a4bf8e6c69..bf2a060796b6afa5a16d002fa6f48b651055aae2 100644 (file)
@@ -82,7 +82,12 @@ 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 {}