style: "echo ''" -> "echo"

This commit is contained in:
Emile Clark-Boman 2025-07-25 13:17:58 +10:00
parent de49956a53
commit 32e66c2329

26
bin/g
View file

@ -235,30 +235,30 @@ fi
current_branch=$(git rev-parse --abbrev-ref HEAD)
if [[ "$current_branch" == "$2" ]]; then
if confirm "You are currently on the branch '$2'! Do you want me to switch to 'master'?"; then
echo ''
echo
git checkout master
else
echo ''
echo
fi
fi
git branch -d "$2" &>/dev/null
if [[ "$?" -ne 0 ]]; then
if confirm "The branch '$2' hasn't been merged. Are sure you want to delete this branch?"; then
echo ''
echo
git branch -D "$2"
else
echo ''
echo
fi
fi
ls $(git_root)/.git/refs/remotes/*/$2 &>/dev/null
if [[ "$?" -eq 0 ]]; then
if confirm 'Would you like to delete this branch on the remote as well?'; then
echo ''
echo
git push origin --delete "$2"
else
echo ''
echo
echo 'OK, just thought I'"'"'d ask.'
fi
fi
@ -332,10 +332,10 @@ for local_branch in $branches; do
# Detect and delete branches not on remote
else
if confirm "Failed to fast forward local branch '$local_branch'. Do you want to delete the local branch if it's merged?"; then
echo ''
echo
git branch -d "$local_branch"
else
echo ''
echo
fi
fi
fi
@ -415,10 +415,10 @@ if [ ! -z "$tags" ]; then
if confirm "Would you like to push these tags (${tags}) to the remote as well?"; then
local_branch=$(git rev-parse --abbrev-ref HEAD)
remote=$(git config --get branch.$local_branch.remote)
echo ''
echo
follow_tags='--follow-tags'
else
echo ''
echo
echo 'OK, just thought I'"'"'d ask.'
fi
fi
@ -557,13 +557,13 @@ git log --color \
| sed 's/<validity-Y>/expired/g' \
| sed 's/<validity-B>/bad/g' \
| sed 's/<validity-E>/error/g'
echo ''
echo
;;
hist)
git reflog HEAD@{now} --date=relative \
|awk '$5 ~ /checkout:/ { sub(/HEAD@/, "", $2); sub(/:/, "", $4); if (!seen[$10]++) print $10, $2, $3, $4}'
echo ''
echo
;;
submodule)
@ -587,7 +587,7 @@ do
echo "url = $url"
cd "$gitroot"
git submodule add "$url" "$reldir"
echo ''
echo
done
cd "$gitroot"
git submodule init