aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-05-10 16:41:31 +0200
committerHampusM <hampus@hampusmat.com>2021-05-10 16:41:31 +0200
commit35750791cdf588f74ac6cf84fab4af911df7a0cb (patch)
treefadeb8a91b6b74376d682004d9d7f88197420900
parentd546492f4fd400ae61a6abbe1905fdbc67451c4d (diff)
Fixed commit file index regex because Git is weird
-rw-r--r--api/git.js2
1 files changed, 1 insertions, 1 deletions
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];