Skip to content

Commit be6a293

Browse files
committed
if there is no code changes, it may happen now that there are nodes but no source node
1 parent c3a6be9 commit be6a293

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

Iceberg/IceDiff.class.st

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@ IceDiff >> codeSubdirectoryNode [
120120

121121
]
122122

123+
{ #category : 'accessing' }
124+
IceDiff >> codeSubdirectoryNodeOrNil [
125+
126+
^ self repository subdirectory
127+
ifNotEmpty: [
128+
tree
129+
firstNodeSuchThat: [ :definition | self isCodeSubdirectory: definition ]
130+
ifNone: [ nil ] ]
131+
ifEmpty: [ tree ]
132+
133+
]
134+
123135
{ #category : 'copying' }
124136
IceDiff >> copyWithOnly: aCollection [
125137

@@ -167,8 +179,12 @@ IceDiff >> imageChangesForPackages: aCollection [
167179

168180
{ #category : 'testing' }
169181
IceDiff >> includesPackageNamed: aString [
170-
^ self isEmpty not
171-
and: [ self codeSubdirectoryNode includesKey: aString ]
182+
183+
self isEmpty ifTrue: [ ^ false ].
184+
185+
^ self codeSubdirectoryNodeOrNil
186+
ifNotNil: [ :aSubdirNode | aSubdirNode includesKey: aString ]
187+
ifNil: [ false ]
172188
]
173189

174190
{ #category : 'testing' }

0 commit comments

Comments
 (0)