Skip to content

Instantly share code, notes, and snippets.

@thalesfsp
Forked from ianhinder/git-submodule-fetch
Created April 29, 2018 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thalesfsp/255489d1f8baa2916a190d4004e59c70 to your computer and use it in GitHub Desktop.
Save thalesfsp/255489d1f8baa2916a190d4004e59c70 to your computer and use it in GitHub Desktop.
Parallel submodule fetch
#!/bin/bash
set -e
set -u
if [ $# -eq 0 ]; then
git submodule -q foreach 'echo $name' | xargs -n 1 -P 10 git-submodule-fetch
else
while [ $# -gt 0 ]; do
(cd $1; git fetch -q || echo "Failed to fetch $1">&2)
/bin/echo -n .
shift
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment