Skip to content

Commit 1f39735

Browse files
committed
feat(git): Using parallel for pull all
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
1 parent 0a2b683 commit 1f39735

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

functions/git

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,20 @@ git_browse() {
105105
done < <(find . -type d -maxdepth 1 -print0)
106106
}
107107

108+
git_refresh() {
109+
if [[ ${#} -gt 0 ]]; then
110+
cd "${1}" || return 1
111+
fi
112+
113+
git default --quiet
114+
git pull --quiet
115+
git sweep
116+
}
117+
118+
export -f git_refresh
119+
108120
git_pull_all() {
109-
git_browse 'git default && git pull && git sweep'
121+
parallel --bar git_refresh ::: *
110122
}
111123

112124
git_remote_repository() {

0 commit comments

Comments
 (0)