repos / pgit

static site generator for git
git clone https://github.com/picosh/pgit.git

commit
9b1e71e
parent
ff7c65b
author
Eric Bower
date
2023-08-17 19:53:42 +0000 UTC
feat: sort files in tree
1 files changed,  +6, -0
M main.go
+6, -0
 1@@ -828,6 +828,12 @@ func (c *Config) writeRevision(repo *git.Repository, pageData *PageData, refs []
 2 
 3 	wg.Wait()
 4 
 5+	sort.Slice(treeEntries, func(i, j int) bool {
 6+		nameI := treeEntries[i].Path
 7+		nameJ := treeEntries[j].Path
 8+		return nameI < nameJ
 9+	})
10+
11 	c.Logger.Infof(
12 		"compilation complete (%s) branch (%s)",
13 		c.RepoName,