Let git push-pending skip GUI when nothing found

This commit is contained in:
Talia 2021-03-05 14:29:35 +01:00
parent 94addc9a95
commit 8fefbaf417
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,9 @@ repositories=$(git-pending "$@" \
| grep '^ahead' \ | grep '^ahead' \
| lua -e 'for line in io.lines() do print(line:match("[^/]+$")); print((line:gsub("^[^ ]* ", ""))) end' \ | lua -e 'for line in io.lines() do print(line:match("[^/]+$")); print((line:gsub("^[^ ]* ", ""))) end' \
) )
if [ -z "$repositories" ]
then exit
fi
echo "$repositories" \ echo "$repositories" \
| zenity --list --column Repository --column Path --text "Repositories that need pushing:" --multiple --title "Git" --separator ';' --width 800 --height 300 --print-column=2 2>/dev/null \ | zenity --list --column Repository --column Path --text "Repositories that need pushing:" --multiple --title "Git" --separator ';' --width 800 --height 300 --print-column=2 2>/dev/null \
| tr ';' '\n' \ | tr ';' '\n' \