mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
archive-file: cleaner way to get current branch
This commit is contained in:
parent
7d1ede1022
commit
95db4e7ad5
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# extract current branch name
|
||||
BRANCH=$(git name-rev HEAD 2> /dev/null | awk "{ print \$2 }")
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
|
||||
|
||||
# get name of the most top folder of current directory, used for the
|
||||
# output filename
|
||||
|
|
|
|||
Loading…
Reference in a new issue