From f70b20e49989a8445b88365e8abec0e336263282 Mon Sep 17 00:00:00 2001
From: href <href@random.sh>
Date: Sat, 24 Nov 2018 14:38:34 +0100
Subject: [PATCH] version string: force git abbrev size to 8 chars

Fixes #389

Older git versions defaults to 7 chars.
---
 mix.exs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mix.exs b/mix.exs
index 865ead43b1..9ffcf59287 100644
--- a/mix.exs
+++ b/mix.exs
@@ -95,7 +95,7 @@ defp version(version) do
     {git_tag, git_pre_release} =
       with {tag, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=0"]),
            tag = String.trim(tag),
-           {describe, 0} <- System.cmd("git", ["describe", "--tags"]),
+           {describe, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=8"]),
            describe = String.trim(describe),
            ahead <- String.replace(describe, tag, "") do
         {String.replace_prefix(tag, "v", ""), if(ahead != "", do: String.trim(ahead))}
-- 
GitLab