From: Oleg Broytman Date: Mon, 28 Dec 2020 12:54:34 +0000 (+0300) Subject: Refactor(ls-not-pushed): Split into `-recursive` and `-repos` X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=commitdiff_plain;h=e364445d1adb40b906101cb3ce1acde85b2ffd36 Refactor(ls-not-pushed): Split into `-recursive` and `-repos` --- diff --git a/ls-not-pushed b/ls-not-pushed index 5060190..bc950e5 100755 --- a/ls-not-pushed +++ b/ls-not-pushed @@ -1,5 +1,2 @@ #! /bin/sh - -exec "`dirname \"$0\"`"/do-all \ - 'test "$g" = "$d/.git" || continue; cd "$d" &&' \ - 'git branch --verbose | grep -q "ahead\|behind" && echo "$d"' +if git branch --verbose | grep -q "ahead\|behind"; then pwd; fi diff --git a/ls-not-pushed-recursive b/ls-not-pushed-recursive new file mode 100755 index 0000000..e45427c --- /dev/null +++ b/ls-not-pushed-recursive @@ -0,0 +1,4 @@ +#! /bin/sh + +prog_dir="`dirname \"$0\"`" && +exec "$prog_dir"/run-recursive "$prog_dir"/ls-not-pushed diff --git a/ls-not-pushed-repos b/ls-not-pushed-repos new file mode 100755 index 0000000..028f900 --- /dev/null +++ b/ls-not-pushed-repos @@ -0,0 +1,7 @@ +#! /bin/sh + +cd "`dirname \"$0\"`" && +prog_dir="`pwd`" && +export prog_dir + +exec "$prog_dir"/run-repos "$prog_dir"/ls-not-pushed-recursive