Move recursion from git-push-pending to git-pending

This commit is contained in:
Talia 2021-01-20 14:50:58 +01:00
parent 6f2f2769a2
commit 4587d1b0c1
2 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,10 @@
#!/bin/sh #!/bin/sh
for line in $@ repos() {
(for name in $@; do find -L $name -name '*.git' -type d | sed 's/\/.git$//'; done)
}
for line in $(repos "$@")
do do
dir=$(pwd) dir=$(pwd)
cd "$line" cd "$line"

View file

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
(for name in $@; do find -L $name -name '*.git' -type d | sed 's/\/.git$//'; done) \ git-pending "$@" \
| xargs 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' \
| 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 \