diff options
-rwxr-xr-x | git/git-outofdate | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/git/git-outofdate b/git/git-outofdate index b430e2a..83dc7d5 100755 --- a/git/git-outofdate +++ b/git/git-outofdate @@ -5,10 +5,14 @@ [ -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}' + git status -uno | sed -n '/^Your branch/{s///;p}' | + while read -r s; do + cd - + printf '%s %s\n' "$(readlink -f "$dir"/..)" "$s" + break + done ) done | grep -v 'up to date' |