From 539d9f4c3070abb0f024b133a4f53187a76cbcb7 Mon Sep 17 00:00:00 2001 From: Christoph Handel Date: Tue, 1 Aug 2017 20:59:22 +0200 Subject: [PATCH] Fix git version check with four digits (1.8.3.1) (#2236) --- modules/setting/setting.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 82187e81be..5bd2495287 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -762,7 +762,7 @@ func NewContext() { log.Fatal(4, "Error retrieving git version: %v", err) } - splitVersion := strings.SplitN(binVersion, ".", 3) + splitVersion := strings.SplitN(binVersion, ".", 4) majorVersion, err := strconv.ParseUint(splitVersion[0], 10, 64) if err != nil {