From 8fefbaf417aff39c38dfcf7fb562e07deadaf780 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Fri, 5 Mar 2021 14:29:35 +0100 Subject: [PATCH] Let git push-pending skip GUI when nothing found --- bin/git-push-pending | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/git-push-pending b/bin/git-push-pending index 58fb418..31f9648 100755 --- a/bin/git-push-pending +++ b/bin/git-push-pending @@ -4,6 +4,9 @@ repositories=$(git-pending "$@" \ | grep '^ahead' \ | lua -e 'for line in io.lines() do print(line:match("[^/]+$")); print((line:gsub("^[^ ]* ", ""))) end' \ ) +if [ -z "$repositories" ] +then exit +fi 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 \ | tr ';' '\n' \