]> git.phdru.name Git - git-scripts.git/commitdiff
Refactor(ls-not-pushed): Split into `-recursive` and `-repos`
authorOleg Broytman <phd@phdru.name>
Mon, 28 Dec 2020 12:54:34 +0000 (15:54 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 28 Dec 2020 12:54:34 +0000 (15:54 +0300)
ls-not-pushed
ls-not-pushed-recursive [new file with mode: 0755]
ls-not-pushed-repos [new file with mode: 0755]

index 506019032b285f5975682ef83a423b4091754756..bc950e5c678b24217b34858b1366418a66133d69 100755 (executable)
@@ -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 (executable)
index 0000000..e45427c
--- /dev/null
@@ -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 (executable)
index 0000000..028f900
--- /dev/null
@@ -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