-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cache flushing after external command for newly created pack files
- Loading branch information
Showing
7 changed files
with
24 additions
and
18 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/FileSystem-Git.package/FileSystemGitRepository.class/instance/refsChangedExternally.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 2 additions & 15 deletions
17
src/FileSystem-Git.package/GitRepository.class/instance/newUnitOfWork.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/FileSystem-Git.package/GitUnitOfWork.class/instance/flushStores.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
accessing | ||
flushStores | ||
self | ||
initializeCaches; | ||
initializeStores. |
12 changes: 12 additions & 0 deletions
12
src/FileSystem-Git.package/GitUnitOfWork.class/instance/initializeStores.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters