Ensure only the current branch appears in GIT_BRANCH.
authorDavid Griffith <dave@661.org>
Mon, 27 May 2019 07:37:20 +0000 (00:37 -0700)
committerDavid Griffith <dave@661.org>
Mon, 27 May 2019 07:37:20 +0000 (00:37 -0700)
Makefile

index 5bdb2157fa5c576d2a1391349ae7d00755979ce0..358dcc2026889ad8a6e32bd5d076f45287c62d6a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -132,7 +132,7 @@ ifneq ($(and $(wildcard $(GIT_DIR)),$(shell which git)),)
        GIT_HASH_SHORT = $(shell git rev-parse --short HEAD)
        GIT_DATE = $(shell git show -s --format=%ci)
 else
-       GIT_BRANCH = $(shell echo "$Format:%D$" | sed s/^.*\>\\s*//)
+       GIT_BRANCH = $(shell echo "$Format:%D$" | sed s/^.*\>\\s*// | cut -d, -f1)
        GIT_HASH = "$Format:%H$"
        GIT_HASH_SHORT = "$Format:%h$"
        GIT_DATE = "$Format:%ci$"