From 51ab1973315de06d71064b9fe6e2cc97ee4d3768 Mon Sep 17 00:00:00 2001
From: Malf Furious <m@lfurio.us>
Date: Sun, 27 Aug 2017 23:51:18 -0400
Subject: Update function systr_repo_finish_commit

Moved logic for reading author information into this function
---
 repo-mutate.sh | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/repo-mutate.sh b/repo-mutate.sh
index d88452e..0f76316 100644
--- a/repo-mutate.sh
+++ b/repo-mutate.sh
@@ -23,7 +23,7 @@ function systr_repo_create_commit
 }
 
 ##
-# systr_repo_finish_commit <commit> <parent> <author> <email> [<merge>]
+# systr_repo_finish_commit <commit> <parent> [<merge>]
 #
 # Finish writing a commit by adding meta-data to the commit directory.
 # The commit mesasge is taken from the file <commit>.mesg at the root
@@ -33,22 +33,32 @@ function systr_repo_create_commit
 ##
 function systr_repo_finish_commit
 {
-    if [ $# -lt 4 ]; then
+    if [ $# -lt 2 ]; then
         echo "Fatal: too few arguments to systr_repo_finish_commit"
         exit 1
     fi
 
     commit="$1"
     parent="$2"
-    author="$3"
-    email="$4"
 
-    if [ $# -gt 4 ]; then
-        merge="$5"
+    if [ $# -gt 2 ]; then
+        merge="$3"
     else
         merge=""
     fi
 
+    if [ -f ".systr/author" ]; then
+        read author <.systr/author
+    else
+        author="Anonymous"
+    fi
+
+    if [ -f ".systr/email" ]; then
+        read email <.systr/email
+    else
+        email="<anon>"
+    fi
+
     if [[ "$remote" == "" ]]; then
         (
             cd "$path"
-- 
cgit v1.2.3