Fix gone-branch detection with nobracket format

This commit is contained in:
Utsav Sabharwal 2026-06-08 15:54:17 +05:30
parent 2b69f909fe
commit 6ec7520ee2
No known key found for this signature in database
GPG key ID: 42AEF208344FFEF8

View file

@ -33,7 +33,7 @@ if [ "$prune" = true ]; then
fi
gone_branches=$(git for-each-ref --format \
'%(if:equals=[gone])%(upstream:track,nobracket)%(then)%(refname:short)%(end)' refs/heads/ | sed '/^$/d')
'%(if:equals=gone)%(upstream:track,nobracket)%(then)%(refname:short)%(end)' refs/heads/ | sed '/^$/d')
if [ -z "$gone_branches" ]; then
echo "No branches with a gone remote found."