summaryrefslogtreecommitdiff
path: root/bin/changelog
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-12-02 18:31:57 +0800
committerRobert Speicher <rspeicher@gmail.com>2016-12-02 18:31:57 +0800
commit614fcfc4df6226f84c5b7e10864df45b24e72e46 (patch)
tree87e656bc14a4dd23f13382ab6bfb071a182266c6 /bin/changelog
parent14046b9c734e5e6506d63276f39f3f9d770c3699 (diff)
downloadgitlab-ce-614fcfc4df6226f84c5b7e10864df45b24e72e46.tar.gz
Simplify `branch_name` in bin/changelogrs-simplify-changelog-branch_name
The `--short` option has existed since at least 1.8.1: https://git-scm.com/docs/git-symbolic-ref/1.8.1
Diffstat (limited to 'bin/changelog')
-rwxr-xr-xbin/changelog2
1 files changed, 1 insertions, 1 deletions
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