From 229a08285d53698d2aab7b885bbd20d62a05cf01 Mon Sep 17 00:00:00 2001 From: Dmitry Bashkatov Date: Thu, 12 Mar 2026 17:44:44 +0300 Subject: [PATCH] add submodule support --- mgitstatus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mgitstatus b/mgitstatus index 0878b45..2c83d62 100755 --- a/mgitstatus +++ b/mgitstatus @@ -241,7 +241,7 @@ for DIR in "${@:-"."}"; do NEEDS_PULL_BRANCHES="" NEEDS_UPSTREAM_BRANCHES="" - for REF_HEAD in $(cd "$GIT_DIR/refs/heads" && find . -type 'f' | sed "s/^\.\///"); do + for REF_HEAD in $(git --git-dir "$GIT_DIR" for-each-ref --format='%(refname:short)' refs/heads); do # Check if this branch is tracking an upstream (local/remote branch) UPSTREAM=$(git --git-dir "$GIT_DIR" rev-parse --abbrev-ref --symbolic-full-name "$REF_HEAD@{u}" 2>/dev/null) EXIT_CODE="$?"