Skip to content

Commit

Permalink
Fix git default branch script
Browse files Browse the repository at this point in the history
  • Loading branch information
mmena1 committed Mar 25, 2024
1 parent 3d0d6fb commit 6cd9f7d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function __git.default_branch
end

# Fetch remote information to ensure we have the latest default branch info,
# cleaning up any references that doesn't exist anymore.
git remote update $remote --prune
# cleaning up any references that doesn't exist anymore, while suppressing direct output
git remote update $remote --prune > /dev/null 2>&1

# Extract the default branch name from the 'HEAD branch' line of the 'git remote show' output
set -l default_branch (git remote show $remote | grep 'HEAD branch' | sed 's/.*: //')
Expand Down

0 comments on commit 6cd9f7d

Please sign in to comment.