From e364445d1adb40b906101cb3ce1acde85b2ffd36 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 28 Dec 2020 15:54:34 +0300 Subject: [PATCH] Refactor(ls-not-pushed): Split into `-recursive` and `-repos` --- ls-not-pushed | 5 +---- ls-not-pushed-recursive | 4 ++++ ls-not-pushed-repos | 7 +++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 ls-not-pushed-recursive create mode 100755 ls-not-pushed-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 -- 2.39.2