Skip to content

Commit

Permalink
Fix cache flushing after external command for newly created pack files
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Dec 30, 2024
1 parent 9ce8142 commit f655fb1
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
git porcelain - external
refsChangedExternally
self unitOfWork flushCaches.
self unitOfWork flushStores.
self repository changed: #allReferences.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"pushToRemote:update:deleteRemoteBranches:force:" : "mad 11/10/2024 15:34",
"pushToUpstreamBranchOf:ifNone:" : "jr 3/4/2020 00:49",
"recursivelyCollectCommits:into:limit:" : "jr 3/2/2017 10:39",
"refsChangedExternally" : "mad 5/18/2024 11:48",
"refsChangedExternally" : "mad 12/30/2024 22:52",
"remoteHead:" : "mad 10/1/2023 16:52",
"remoteNames" : "jr 7/22/2020 22:02",
"remoteUrl:" : "jr 3/4/2020 00:46",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
public-accessing
newUnitOfWork
| objectStores refStores |
objectStores := OrderedCollection new: 2.
objectStores add: (GitLooseObjectStore baseDir: self baseDir).
(GitPackedObjectStore hasPacks: self) ifTrue:
[objectStores add: (GitPackedObjectStore packsDir: self packsDir)].
objectStores do: [:each | each repository: self].
refStores := OrderedCollection new: 2.
refStores add: (GitLooseRefStore baseDir: self baseDir).
(GitPackedRefStore existsIn: self) ifTrue:
[refStores add: (GitPackedRefStore on: self)].
refStores do: [:each | each repository: self].
^ GitUnitOfWork new
repository: self;
refStores: refStores;
objectStores: objectStores;
yourself

initializeStores;
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"initializeOn:" : "mad 10/24/2024 14:39",
"isInitialized" : "CamilloBruni 9/2/2012 11:33",
"nameOf:in:" : "jr 11/23/2016 18:22",
"newUnitOfWork" : "jr 4/20/2020 21:21",
"newUnitOfWork" : "mad 12/30/2024 22:52",
"objectCache" : "jr 4/20/2020 21:21",
"packsDir" : "MaxLeske 8/12/2012 13:43",
"printOn:" : "jr 3/4/2020 23:57",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
flushStores
self
initializeCaches;
initializeStores.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
initialize-release
initializeStores
objectStores := OrderedCollection new: 2.
objectStores add: (GitLooseObjectStore baseDir: self repository baseDir).
(GitPackedObjectStore hasPacks: self repository) ifTrue:
[objectStores add: (GitPackedObjectStore packsDir: self repository packsDir)].
objectStores do: [:each | each repository: self repository].
refStores := OrderedCollection new: 2.
refStores add: (GitLooseRefStore baseDir: self repository baseDir).
(GitPackedRefStore existsIn: self repository) ifTrue:
[refStores add: (GitPackedRefStore on: self repository)].
refStores do: [:each | each repository: self repository].
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"fetchSpecOfTrackingBranch:" : "jr 5/27/2018 21:18",
"finish" : "jr 4/17/2020 12:19",
"flushCaches" : "jr 3/10/2020 22:03",
"flushStores" : "mad 12/30/2024 22:52",
"followSymbolicRefs:" : "jr 2/16/2020 00:35",
"followSymbolicRefs:do:" : "jr 4/30/2020 00:59",
"hasLooseObject:" : "jr 2/17/2020 22:33",
Expand All @@ -44,6 +45,7 @@
"headerOfObjectNamed:ifAbsent:" : "jr 2/12/2020 23:36",
"initialize" : "jr 3/10/2020 21:24",
"initializeCaches" : "jr 5/1/2020 22:40",
"initializeStores" : "mad 12/30/2024 22:51",
"loadObjectNamed:" : "jr 2/12/2020 23:38",
"moveRef:to:" : "mad 11/28/2023 15:59",
"nameOf:in:" : "jr 3/1/2020 01:47",
Expand Down

0 comments on commit f655fb1

Please sign in to comment.