darkrc/bin/git-push-pending

10 lines
486 B
Text
Raw Normal View History

2020-07-20 14:09:08 +00:00
#!/bin/sh
2020-07-21 17:28:59 +00:00
(for name in $@; do find -L $name -name '*.git' -type d | sed 's/\/.git$//'; done) \
2020-07-20 14:09:08 +00:00
| xargs git-pending \
| grep '^ahead' \
| lua -e 'for line in io.lines() do print(line:match("[^/]+$")); print((line:gsub("^[^ ]* ", ""))) end' \
| zenity --list --column Repository --column Path --text "Repositories that need pushing:" --multiple --title "Git" --separator ';' --width 800 --height 300 --print-column=2 \
| tr ';' '\n' \
| xargs -L 1 -I€ sh -c 'cd € && git push'