diff options
author | Ori Bernstein <ori@eigenstate.org> | 2021-09-03 02:47:18 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2021-09-03 02:47:18 +0000 |
commit | d9564c0642b9a8280f8e4dfe9ff15a2c65b6d93d (patch) | |
tree | 5c956042dbc6eea3d4ee776a74a50d6424c5d6e2 /sys/lib | |
parent | 485b334608910bbf6930a4f52ca946ba092fad04 (diff) |
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.
Diffstat (limited to 'sys/lib')
-rw-r--r-- | sys/lib/git/common.rc | 17 |
1 files changed, 16 insertions, 1 deletions
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}' </adm/keys.who} + if(~ $email '') + email=`$nl{awk -F'|' '$1=="'$user'" {x=$5} END{print x}' </adm/keys.who} + } + if(~ $name '') + name=glenda + if(~ $email '') + email=glenda@9front.local +} + +# merge1 out ours base theirs fn merge1 {@{ rfork e n=$pid |