From c6507440c457a7a2499fa5265110e550946faffb Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 5 Nov 2026 22:00:00 -1000 Subject: Point the ordered log at the commit-graph hook Without generation numbers, git can sort the log topologically only after walking the whole history. On a 20,000-commit scratch repository the graph and both commit-sort orders took the log page from 5 ms to between 56 and 64 ms, and the split graph post-receive.commit-graph writes brought all three back to 5 ms. --- MANUAL.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MANUAL.txt b/MANUAL.txt index 2e785a1..214bd36 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -138,7 +138,10 @@ commit-filter:: commit-sort:: Flag which, when set to "date", enables strict date ordering in the commit log, and when set to "topo" enables strict topological ordering. - If unset, the default ordering of "git log" is used. Default value: + If unset, the default ordering of "git log" is used. Either ordering + makes git read every commit in the history before the first row unless + the repository has a commit-graph file, which + custom/hooks/post-receive.commit-graph keeps current. Default value: none. See also: "repo.commit-sort". css:: @@ -197,7 +200,10 @@ enable-cache-list:: enable-commit-graph:: Flag which, when set to "1", makes cgit print an ASCII-art commit history graph to the left of the commit messages in the repository log - page. Default value: "0". See also: "repo.enable-commit-graph". + page. The graph puts the log in topological order, for which git reads + every commit in the history before the first row unless the repository + has a commit-graph file. custom/hooks/post-receive.commit-graph keeps + one current. Default value: "0". See also: "repo.enable-commit-graph". enable-commit-trailers:: Flag which, when set to "1", makes the commit page split the trailer -- cgit 2.12.1