From 317061b3f89363f849e770b058b5606a86d59a68 Mon Sep 17 00:00:00 2001
From: Teake Nutma <t.a.nutma@rug.nl>
Date: Tue, 5 Jul 2022 09:22:37 +0200
Subject: [PATCH] Fix small regex bug

GNU sed treats '\>' literal, macOS treats it as '>'. Luckily,
the escaping backslash is not needed on macOS.
---
 bin/git-log-mr | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/git-log-mr b/bin/git-log-mr
index 5c6f286..e4ae9c4 100755
--- a/bin/git-log-mr
+++ b/bin/git-log-mr
@@ -83,13 +83,13 @@ function merge_request_log_single() {
     fi
 
     committers=$(git log --format='%an <%ae>' "${hash}^..${hash}" --skip=1)
-    committers_no_email=$(echo "${committers}" | sed 's/ <.*\>//g' | awk '{$1=$1;print}')
+    committers_no_email=$(echo "${committers}" | sed 's/ <.*>//g' | awk '{$1=$1;print}')
     committers_by_num_commits=$(echo "${committers_no_email}" | sort | uniq -c | sort -nr | awk '{$1=$1;print}' | cut -d ' ' -f 2- | awk 'ORS=", "'| sed 's/, $//')
     contributors=$(echo "${committers}" | sort | uniq | awk 'ORS=", "'| sed 's/, $//')
     num_commits=$(echo "${committers}" | wc -l | tr -d '[:space:]')
     text_commits=$(pluralize "${num_commits}" "commit")
     reviewer=$(git show --format='%cn <%ce>' "${hash}")
-    reviewer_no_email=$(echo "${reviewer}" | sed 's/ <.*\>//g')
+    reviewer_no_email=$(echo "${reviewer}" | sed 's/ <.*>//g')
 
     # The merge request number is in the last line of the body
     merge_request_number=$( { echo "${raw_body}" | tail -n 1 | grep -o -E "![0-9]+"; } || echo "")
-- 
GitLab