Skip to content

Commit bc51fa1

Browse files
committed
define a default Branch Cache Key
1 parent 8800e9d commit bc51fa1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Metacello-GitBasedRepository/MCGitBasedNetworkRepository.class.st

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ MCGitBasedNetworkRepository class >> cacheDirectoryPath: aString [
5656
self cacheDirectory: (aString ifNotEmpty: [ aString asFileReference ])
5757
]
5858

59+
{ #category : 'accessing' }
60+
MCGitBasedNetworkRepository class >> defaultBranchCacheKey [
61+
62+
^ '-default-branch-'
63+
]
64+
5965
{ #category : 'private' }
6066
MCGitBasedNetworkRepository class >> defaultCacheDirectory [
6167

@@ -77,7 +83,7 @@ MCGitBasedNetworkRepository class >> downloadCache [
7783

7884
{ #category : 'accessing' }
7985
MCGitBasedNetworkRepository class >> downloadCacheKey: projectPath version: versionString [
80-
^ projectPath , ':::' , versionString
86+
^ projectPath , ':::' , versionString ifNil: [ self defaultBranchCacheKey ]
8187
]
8288

8389
{ #category : 'utilities' }

0 commit comments

Comments
 (0)