Skip to content

Instantly share code, notes, and snippets.

@adithya2306
Created March 31, 2025 15:19
Show Gist options
  • Save adithya2306/60d04e0d9627633bc3fa6a071ecb2e01 to your computer and use it in GitHub Desktop.
Save adithya2306/60d04e0d9627633bc3fa6a071ecb2e01 to your computer and use it in GitHub Desktop.
#!/bin/bash
export BRANCH="vauxite"
ulimit -n $(ulimit -Hn)
list() {
if ! git -C $1 diff m/$BRANCH > /dev/null; then
echo -e "Error in $1\n"
echo $1 >> .failed_list
elif [ "$(git -C $1 diff m/$BRANCH)" != "" ]; then
echo $1 >> .success_list
printf "$1"
if [ "$(git -C $1 status --porcelain)" != "" ]; then
printf " has UNCOMMITTED CHANGES!!!"
echo $1 >> .uncommitted_list
fi
printf "\n"
git -C $1 log --pretty=oneline --abbrev-commit m/$BRANCH..HEAD | cat
echo
fi
}
export -f list
for f in .success_list .failed_list .uncommitted_list; do
rm -f $f; touch $f
done
repos=$(find -L * -type d -name '.git' 2> /dev/null | sed 's/\/\.git//g' | sort)
parallel -j8 -k list {} ::: $repos
echo -e "\nSuccess:"
cat .success_list
echo -e "\nFailed:"
cat .failed_list
echo -e "\nUncommitted:"
cat .uncommitted_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment