Add full name to account and use it to create commits (#125)

The Git practice is to use the full name when creating commits, not a
user name. This commit fixes that by introducing a fullName field to
Account and using it when creating commits.

For migrating from earlier versions, the user name is used as an initial
value for the full name field.
This commit is contained in:
Robin Stocker
2013-10-06 23:11:09 +02:00
parent 65e6de5ba4
commit 13bff2963e
12 changed files with 49 additions and 20 deletions

View File

@@ -130,7 +130,7 @@ trait WikiService {
try {
git.apply.setPatch(new java.io.ByteArrayInputStream(patch.getBytes("UTF-8"))).call
git.add.addFilepattern(".").call
git.commit.setCommitter(committer.userName, committer.mailAddress).setMessage(pageName match {
git.commit.setCommitter(committer.fullName, committer.mailAddress).setMessage(pageName match {
case Some(x) => s"Revert ${from} ... ${to} on ${x}"
case None => s"Revert ${from} ... ${to}"
}).call
@@ -175,7 +175,7 @@ trait WikiService {
// commit and push
optionIf(added || deleted){
defining(git.commit.setCommitter(committer.userName, committer.mailAddress)
defining(git.commit.setCommitter(committer.fullName, committer.mailAddress)
.setMessage(if(message.trim.length == 0){
if(deleted){
s"Rename ${currentPageName} to ${newPageName}"
@@ -234,4 +234,4 @@ trait WikiService {
}
}
}
}