Skip to content

Commit bdf67fb

Browse files
tobixenclaude
andcommitted
Support reftable refs format
Use git for-each-ref instead of filesystem refs/heads to support both traditional refs and reftable format. From: fboender#62 Original author: bailey-coding 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 73e7a59 commit bdf67fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mgitstatus

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ for DIR in "${@:-"."}"; do
241241
NEEDS_PULL_BRANCHES=""
242242
NEEDS_UPSTREAM_BRANCHES=""
243243

244-
for REF_HEAD in $(cd "$GIT_DIR/refs/heads" && find . -type 'f' | sed "s/^\.\///"); do
244+
for REF_HEAD in $(git --git-dir "${GIT_DIR}" for-each-ref --format='%(refname:short)' refs/heads/); do
245245
# Check if this branch is tracking an upstream (local/remote branch)
246246
UPSTREAM=$(git --git-dir "$GIT_DIR" rev-parse --abbrev-ref --symbolic-full-name "$REF_HEAD@{u}" 2>/dev/null)
247247
EXIT_CODE="$?"

0 commit comments

Comments
 (0)