Skip to content

Commit dd6def8

Browse files
authored
Use branch --show-current for current branch name (#104)
rev-parse came from ChatGPT and it only works _sometimes_
1 parent bf06155 commit dd6def8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stamp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e # Exit on errors
44
# set -x # Shell debugging
55

66
# First, check that we're on the main branch.
7-
BRANCH=$(git rev-parse --abbrev-rev HEAD)
7+
BRANCH=$(git branch --show-current)
88
if [ "$BRANCH" != "main" ] ; then
99
echo "Not on main, exiting!"
1010
exit 1

0 commit comments

Comments
 (0)