Skip to content

Commit

Permalink
git: truncate existing oversized GitStore logs
Browse files Browse the repository at this point in the history
  • Loading branch information
LinqLover committed Jan 10, 2024
1 parent da63630 commit 7534ab5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/FileSystem-Git.package/monticello.meta/postscript.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@ FileSystemGitCompatibility hadInadequateFromUnixTimeImplementation ifFalse:
changeRecord ifNotNil:
[[changeRecord fileIn]
ensure: [Smalltalk globals removeKey: #TEMP_Squot_ShadowedChangeRecord255]]].
FileSystemGitCompatibility ensureValidFromUnixTimeImplementation.'!
FileSystemGitCompatibility ensureValidFromUnixTimeImplementation.
"2024-01-10: fix git log rotation and truncate older logs, see https://github.com/hpi-swa/Squot/pull/410"
(GitStore classPool at: #LogMessages) ifNotNil: [:logMessages |
| count |
count := logMessages size.
GitStore classPool
at: #LogMessages put: ((logMessages asArray last: (count := 5000 clampHigh: count)) as: LinkedList) "forth and back conversion to avoid inefficient LinkedList(...)>>#last: (quadratic in older versions of Squeak)";
at: #LogMessageCount put: count].'!

0 comments on commit 7534ab5

Please sign in to comment.