]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
gitconfig: Update alias ru to run updates in parallel.
authorSimon Ruderich <simon@ruderich.org>
Sun, 14 Oct 2012 19:48:13 +0000 (21:48 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 14 Oct 2012 19:48:13 +0000 (21:48 +0200)
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 {}