From d9564c0642b9a8280f8e4dfe9ff15a2c65b6d93d Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Fri, 3 Sep 2021 02:47:18 +0000 Subject: git: separate author and committer Git has the ability to track the person who creates a commit separately from the person who wrote the commit. For git9, we ignored this feature. However, as we start using git/import more, it will be useful to figure out who imported a commit, as well as who wrote it. This change adds support for seeing this information in git, as well as setting the author and committer separately in git/import. --- sys/lib/git/common.rc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sys/lib/git') diff --git a/sys/lib/git/common.rc b/sys/lib/git/common.rc index 787b5babd..653d6bfb1 100644 --- a/sys/lib/git/common.rc +++ b/sys/lib/git/common.rc @@ -38,7 +38,22 @@ fn present { status=() } -# merge1 out theirs base ours +fn whoami{ + name=`$nl{git/conf user.name} + email=`$nl{git/conf user.email} + if(test -f /adm/keys.who){ + if(~ $name '') + name=`$nl{awk -F'|' '$1=="'$user'" {x=$3} END{print x}'