Skip to content

Instantly share code, notes, and snippets.

@rudiedirkx
Created March 24, 2025 20:40
Show Gist options
  • Save rudiedirkx/5015fe0e66aff73c950bacec69f807b2 to your computer and use it in GitHub Desktop.
Save rudiedirkx/5015fe0e66aff73c950bacec69f807b2 to your computer and use it in GitHub Desktop.
checkfile="${1:-composer.lock}"
#echo "$checkfile"
basebranch="${2:-prod}"
#echo "$basebranch"
branches=`git branch --format='%(refname:short)'`
for branch in $branches; do
#echo "$branch"
cmd="git dif --stat $basebranch...$branch -- $checkfile"
#echo "$cmd"
if [[ $($cmd) ]]; then
echo "$branch"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment