Skip to content

Commit ba34c91

Browse files
committed
🤖 Limit git show-branch in popover to 50 commits
Add --more=50 flag to git show-branch in GitStatusIndicator popover to prevent overflow when branches have many commits. 50 commits is more than enough for the hover preview while preventing console spam from the truncate policy. _Generated with `cmux`_
1 parent 5328fb3 commit ba34c91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/GitStatusIndicator.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,9 @@ if [ "$CURRENT_BRANCH" != "$PRIMARY_BRANCH" ] && git rev-parse --verify "origin/
301301
REFS="$REFS origin/$CURRENT_BRANCH"
302302
fi
303303
304-
# Store show-branch output to avoid running twice
305-
SHOW_BRANCH=$(git show-branch --sha1-name $REFS)
304+
# Store show-branch output (limit to 50 commits for display)
305+
# --more=50 limits to 50 commits after the merge base
306+
SHOW_BRANCH=$(git show-branch --sha1-name --more=50 $REFS)
306307
307308
# Output show-branch
308309
echo "$SHOW_BRANCH"

0 commit comments

Comments
 (0)