From a52d513883e706fe7479660feca42f305e3f4eb9 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 2 Jan 2018 19:47:19 -0800 Subject: [PATCH] cli.git: Get the branch name instead of HEAD sometimes. --- extra/cli/git/git.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extra/cli/git/git.factor b/extra/cli/git/git.factor index 0c24298bcd..1b589a008f 100644 --- a/extra/cli/git/git.factor +++ b/extra/cli/git/git.factor @@ -33,7 +33,8 @@ cli-git-num-parallel [ cpus 2 * ] initialize ?file-info dup [ directory? ] when ; : git-current-branch* ( -- name ) - { "git" "rev-parse" "--abbrev-ref" "HEAD" } + ! { "git" "rev-parse" "--abbrev-ref" "HEAD" } + { "git" "name-rev" "--name-only" "HEAD" } utf8 stream-contents [ blank? ] trim-tail ;