From 95db4e7ad5111dc2f6e35025a3fe5c469610178c Mon Sep 17 00:00:00 2001 From: Nicolai Skogheim Date: Sat, 25 Jul 2015 06:05:37 +0200 Subject: [PATCH] archive-file: cleaner way to get current branch --- bin/git-archive-file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-archive-file b/bin/git-archive-file index cf0d0f0..bbb4723 100755 --- a/bin/git-archive-file +++ b/bin/git-archive-file @@ -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