diff --git a/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/refsChangedExternally.st b/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/refsChangedExternally.st index 4c9566eb..dbba6a21 100644 --- a/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/refsChangedExternally.st +++ b/src/FileSystem-Git.package/FileSystemGitRepository.class/instance/refsChangedExternally.st @@ -1,4 +1,4 @@ git porcelain - external refsChangedExternally - self unitOfWork flushCaches. + self unitOfWork flushStores. self repository changed: #allReferences. \ No newline at end of file diff --git a/src/FileSystem-Git.package/FileSystemGitRepository.class/methodProperties.json b/src/FileSystem-Git.package/FileSystemGitRepository.class/methodProperties.json index 70717b87..1b6cdfec 100644 --- a/src/FileSystem-Git.package/FileSystemGitRepository.class/methodProperties.json +++ b/src/FileSystem-Git.package/FileSystemGitRepository.class/methodProperties.json @@ -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", diff --git a/src/FileSystem-Git.package/GitRepository.class/instance/newUnitOfWork.st b/src/FileSystem-Git.package/GitRepository.class/instance/newUnitOfWork.st index 31463d47..f4b37f37 100644 --- a/src/FileSystem-Git.package/GitRepository.class/instance/newUnitOfWork.st +++ b/src/FileSystem-Git.package/GitRepository.class/instance/newUnitOfWork.st @@ -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 - \ No newline at end of file + initializeStores; + yourself \ No newline at end of file diff --git a/src/FileSystem-Git.package/GitRepository.class/methodProperties.json b/src/FileSystem-Git.package/GitRepository.class/methodProperties.json index 71ccd7a3..ae37e44f 100644 --- a/src/FileSystem-Git.package/GitRepository.class/methodProperties.json +++ b/src/FileSystem-Git.package/GitRepository.class/methodProperties.json @@ -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", diff --git a/src/FileSystem-Git.package/GitUnitOfWork.class/instance/flushStores.st b/src/FileSystem-Git.package/GitUnitOfWork.class/instance/flushStores.st new file mode 100644 index 00000000..d78a6195 --- /dev/null +++ b/src/FileSystem-Git.package/GitUnitOfWork.class/instance/flushStores.st @@ -0,0 +1,5 @@ +accessing +flushStores + self + initializeCaches; + initializeStores. \ No newline at end of file diff --git a/src/FileSystem-Git.package/GitUnitOfWork.class/instance/initializeStores.st b/src/FileSystem-Git.package/GitUnitOfWork.class/instance/initializeStores.st new file mode 100644 index 00000000..fdd47151 --- /dev/null +++ b/src/FileSystem-Git.package/GitUnitOfWork.class/instance/initializeStores.st @@ -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]. \ No newline at end of file diff --git a/src/FileSystem-Git.package/GitUnitOfWork.class/methodProperties.json b/src/FileSystem-Git.package/GitUnitOfWork.class/methodProperties.json index e0ad3690..5f5b3342 100644 --- a/src/FileSystem-Git.package/GitUnitOfWork.class/methodProperties.json +++ b/src/FileSystem-Git.package/GitUnitOfWork.class/methodProperties.json @@ -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", @@ -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",