Skip to content

Commit c83c3c7

Browse files
authored
Merge pull request #32824 from JuliaLang/sf/colorless_branches
Use porcelain `git` commands to get branch name
2 parents 1f47617 + 84770f8 commit c83c3c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/version_git.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if [ -n "$(git status --porcelain)" ]; then
3939
# append dirty mark '*' if the repository has uncommitted changes
4040
commit_short="$commit_short"*
4141
fi
42-
branch=$(git branch | sed -n '/\* /s///p')
42+
branch=$(git rev-parse --abbrev-ref HEAD)
4343

4444
topdir=$(git rev-parse --show-toplevel)
4545
verchanged=$(git blame -L ,1 -sl -- "$topdir/VERSION" | cut -f 1 -d " ")

0 commit comments

Comments
 (0)