Skip to content

Commit b99a846

Browse files
committed
Merge pull request #399 from nicolaiskogheim/git-archive-file
archive-file: cleaner way to get current branch
2 parents 7d1ede1 + 95db4e7 commit b99a846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/git-archive-file

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
# extract current branch name
4-
BRANCH=$(git name-rev HEAD 2> /dev/null | awk "{ print \$2 }")
4+
BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
55

66
# get name of the most top folder of current directory, used for the
77
# output filename

0 commit comments

Comments
 (0)