# HG changeset patch # User Mike Becker # Date 1723046558 -7200 # Node ID c2d7a9079853b633f0cb100d36d9a75b17be142b # Parent 3ddc29ec33cd29ede0290cff11837fa2d7622ed7 fix order of commit references - fixes #375 diff -r 3ddc29ec33cd -r c2d7a9079853 src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt --- a/src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt Wed Aug 07 18:01:11 2024 +0200 +++ b/src/main/kotlin/de/uapcore/lightpit/types/CommitRef.kt Wed Aug 07 18:02:38 2024 +0200 @@ -58,7 +58,7 @@ .map { it.groupValues[1] } .map { it.toIntOrNull() } .filterNotNull() - .forEach { commitId -> add(CommitRef(currentHash, commitId, currentDesc)) } + .forEach { commitId -> addFirst(CommitRef(currentHash, commitId, currentDesc)) } } } diff -r 3ddc29ec33cd -r c2d7a9079853 src/test/kotlin/de/uapcore/lightpit/types/CommitRefTest.kt --- a/src/test/kotlin/de/uapcore/lightpit/types/CommitRefTest.kt Wed Aug 07 18:01:11 2024 +0200 +++ b/src/test/kotlin/de/uapcore/lightpit/types/CommitRefTest.kt Wed Aug 07 18:02:38 2024 +0200 @@ -47,7 +47,7 @@ CommitRef("74d770da3c80c0c3fc1fb7e44fb710d665127dfe", 13, "a change with commitrefs only in body"), CommitRef("9a14e5628bdf2d578f3385d78022ddcaf23d1abb", 47, "add test file - closed #47 and fixed #90"), CommitRef("9a14e5628bdf2d578f3385d78022ddcaf23d1abb", 90, "add test file - closed #47 and fixed #90") - ), + ).reversed(), parseCommitRefs(""" ::lpitref:cf9f5982ddeb28c7f695dc547fe73abf5460016f:here we fix #50