From 35750791cdf588f74ac6cf84fab4af911df7a0cb Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 10 May 2021 16:41:31 +0200 Subject: Fixed commit file index regex because Git is weird --- api/git.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/git.js b/api/git.js index 3f7b69c..8574dfa 100644 --- a/api/git.js +++ b/api/git.js @@ -212,7 +212,7 @@ function getCommit(base_dir, repo, hash) file_info[data[1].replaceAll(' ', "_")] = data[2]; } else if(line.includes("index")) { - const data = /^index\ ([0-9a-f,]+)\.\.([0-9a-f,]+)(?:\ (\d{6}))?$/.exec(line).slice(1); + const data = /^index\ ([0-9a-f,]+)\.\.([0-9a-f,]+)(?:\ ([0-9,]+))?$/.exec(line).slice(1); file_info["index"] = { "before": data[0], "after": data[1] }; if(data[2]) { file_info["index"]["mode"] = data[2]; -- cgit v1.2.3-18-g5258