]> source.dussan.org Git - gitblit.git/commitdiff
sendmail: list commits in chronological order
authorJames Moger <james.moger@gitblit.com>
Tue, 27 Dec 2011 22:40:25 +0000 (17:40 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 27 Dec 2011 22:40:25 +0000 (17:40 -0500)
groovy/sendmail.groovy

index 5733ae7399c2d9da746f19c65546c0e9859a2fcb..96169095d5002f37072e4cfad21cd4dd1505a79b 100644 (file)
@@ -130,7 +130,7 @@ for (command in commands) {
                \r
        switch (command.type) {\r
                case ReceiveCommand.Type.CREATE:\r
-                       def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)\r
+                       def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()\r
                        commitCount += commits.size()\r
                        if (commits.size() > 0) {\r
                                // new branch\r
@@ -146,7 +146,7 @@ for (command in commands) {
                        }\r
                        break\r
                case ReceiveCommand.Type.UPDATE:\r
-                       def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)\r
+                       def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()\r
                        commitCount += commits.size()\r
                        // fast-forward branch commits table\r
                        changes += "$branchBreak $ref branch updated ($commits.size commits)\n$branchBreak"\r
@@ -154,7 +154,7 @@ for (command in commands) {
                        changes += '\n'\r
                        break\r
                case ReceiveCommand.Type.UPDATE_NONFASTFORWARD:\r
-                       def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name)\r
+                       def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()\r
                        commitCount += commits.size()\r
                        // non-fast-forward branch commits table\r
                        changes += "$branchBreak $ref branch updated [NON fast-forward] ($commits.size commits)\n$branchBreak"\r