Order parents and children

This commit is contained in:
Joscha 2023-08-06 13:57:17 +02:00
parent 520ee0f7da
commit b8c3ce5d47
3 changed files with 6 additions and 4 deletions

View file

@ -60,6 +60,7 @@ pub async fn get(
SELECT hash, message, reachable FROM commits \
JOIN commit_links ON hash = parent \
WHERE child = ? \
ORDER BY reachable DESC, unixepoch(committer_date) ASC \
",
hash
)
@ -73,6 +74,7 @@ pub async fn get(
SELECT hash, message, reachable FROM commits \
JOIN commit_links ON hash = child \
WHERE parent = ? \
ORDER BY reachable DESC, unixepoch(committer_date) ASC \
",
hash
)