aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-12 21:53:39 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-12 22:02:46 +0200
commit1e095f353ae2ca73133869eb23a5ca43faea4628 (patch)
tree6e076ca0d28ba01d3509263d7026987f43ae5b9b
parent0aecf2b0e287844d657beb2ac5a3103ed5e62455 (diff)
downloadxutil-1e095f353ae2ca73133869eb23a5ca43faea4628.tar.gz
Add 'git-outofdate' utility
-rwxr-xr-xgit/git-outofdate14
1 files changed, 14 insertions, 0 deletions
diff --git a/git/git-outofdate b/git/git-outofdate
new file mode 100755
index 0000000..b430e2a
--- /dev/null
+++ b/git/git-outofdate
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# git-uptodate
+
+[ -z "$1" ] && { echo usage: $0 dir 1>&2; exit 1; }
+find "$1" -type d -name .git |
+while read -r dir; do
+ printf %s "$(readlink -f "$dir"/..)"
+ (
+ cd "$dir"/..
+ git status -uno | sed -n '/^Your branch/{s///;p}'
+ )
+done |
+grep -v 'up to date'