From 614fcfc4df6226f84c5b7e10864df45b24e72e46 Mon Sep 17 00:00:00 2001
From: Robert Speicher <rspeicher@gmail.com>
Date: Fri, 2 Dec 2016 18:31:57 +0800
Subject: [PATCH] Simplify `branch_name` in bin/changelog

The `--short` option has existed since at least 1.8.1:
https://git-scm.com/docs/git-symbolic-ref/1.8.1
---
 bin/changelog | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/changelog b/bin/changelog
index b6586ebb6aa..e07b1ad237a 100755
--- a/bin/changelog
+++ b/bin/changelog
@@ -158,7 +158,7 @@ class ChangelogEntry
   end
 
   def branch_name
-    @branch_name ||= %x{git symbolic-ref HEAD}.strip.sub(%r{\Arefs/heads/}, '')
+    @branch_name ||= %x{git symbolic-ref --short HEAD}.strip
   end
 end
 
-- 
GitLab