From 968e4544ccdb50de7b8d76369b75117eff5647eb Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Wed, 10 May 2023 07:02:08 -0600 Subject: [PATCH] commit checker --- scripts/git-check-remote | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 scripts/git-check-remote diff --git a/scripts/git-check-remote b/scripts/git-check-remote new file mode 100755 index 0000000..8355113 --- /dev/null +++ b/scripts/git-check-remote @@ -0,0 +1,8 @@ +#!/bin/sh +# +git -C "$1" remote update + +commits=$(git -C "$1" status | grep -o "[0-9*]\scommit" | cut -d " " -f 1) +[ -z "$commits" ] && exit + +printf "󰊢 $commits"