summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-12-27 17:40:25 -0500
committerJames Moger <james.moger@gitblit.com>2011-12-27 17:40:25 -0500
commit0fb1fd48c430d5dbb61485a9a6c6f52aac200e09 (patch)
treec383a5fd01211a4b41821533468426bd4aba8903
parent4fc3e796b34d25899d60153f2975ead68588a105 (diff)
downloadgitblit-0fb1fd48c430d5dbb61485a9a6c6f52aac200e09.tar.gz
gitblit-0fb1fd48c430d5dbb61485a9a6c6f52aac200e09.zip
sendmail: list commits in chronological order
-rw-r--r--groovy/sendmail.groovy6
1 files changed, 3 insertions, 3 deletions
diff --git a/groovy/sendmail.groovy b/groovy/sendmail.groovy
index 5733ae73..96169095 100644
--- a/groovy/sendmail.groovy
+++ b/groovy/sendmail.groovy
@@ -130,7 +130,7 @@ for (command in commands) {
switch (command.type) {
case ReceiveCommand.Type.CREATE:
- def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)
+ def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
commitCount += commits.size()
if (commits.size() > 0) {
// new branch
@@ -146,7 +146,7 @@ for (command in commands) {
}
break
case ReceiveCommand.Type.UPDATE:
- def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)
+ def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
commitCount += commits.size()
// fast-forward branch commits table
changes += "$branchBreak $ref branch updated ($commits.size commits)\n$branchBreak"
@@ -154,7 +154,7 @@ for (command in commands) {
changes += '\n'
break
case ReceiveCommand.Type.UPDATE_NONFASTFORWARD:
- def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)
+ def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
commitCount += commits.size()
// non-fast-forward branch commits table
changes += "$branchBreak $ref branch updated [NON fast-forward] ($commits.size commits)\n$branchBreak"