ref: 5b3f860bbc0829899781e596605af0c51c226995
parent: b3ef69e810d95f6f45fdbd1fe3ae1da909a95438
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Dec 3 20:13:29 EST 2019
fix author name/email handling (thanks Alex Musolino)
--- a/commit
+++ b/commit
@@ -12,9 +12,9 @@
msgfile=.git/git-msg.$pid
if(test -f /adm/keys.who){
if(~ $name '')
- name=`{cat /adm/keys.who | awk -F'|' '$1=="'$user'" {print $3}'}
+ name=`{awk -F'|' '$1=="'$user'" {x=$3} END{print x}' </adm/keys.who}
if(~ $email '')
- email=`{cat /adm/keys.who | awk -F'|' '$1=="'$user'" {print $5}'}
+ email=`{awk -F'|' '$1=="'$user'" {x=$5} END{print x}' </adm/keys.who}
}
if(~ $name '')
name=glenda
@@ -41,7 +41,7 @@
}
fn editmsg{
- echo '# Author: '$name' <'$email'>' >> $msgfile.tmp
+ echo '# Author: '$"name' <'$"email'>' >> $msgfile.tmp
echo '#' $nl'# ' ^ `$nl{git/walk -fAMR $files} >> $msgfile.tmp
echo '#' >> $msgfile.tmp
echo '# Commit message:' >> $msgfile.tmp