From 3fea99155e5b8b01df91a1ac0cc68fca3d7ad3bf Mon Sep 17 00:00:00 2001 From: Darko Draskovic Date: Fri, 5 Apr 2024 10:40:56 +0000 Subject: [PATCH] Fix reg exp for extracting binary file stats (#1184) --- git/api/commit.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git/api/commit.go b/git/api/commit.go index 2460d5385..b8c8d358b 100644 --- a/git/api/commit.go +++ b/git/api/commit.go @@ -431,7 +431,8 @@ func getChangeInfoTypes( var insertionsDeletionsRegex = regexp.MustCompile(`(\d+|-)\t(\d+|-)\t(.+)`) // Will match "0\t0\tREADME.md => README_new.md" and extract README_new.md. -var renameRegexWithArrow = regexp.MustCompile(`\d+\t\d+\t.+\s=>\s(.+)`) +// Will match "-\t-\tfile_name.bin => file_name_new.bin" and extract file_name_new.bin. +var renameRegexWithArrow = regexp.MustCompile(`(?:\d+|-)\t(?:\d+|-)\t.+\s=>\s(.+)`) func getChangeInfoChanges( ctx context.Context,