Skip to content

Commit 8800e9d

Browse files
committed
fix description of git repository
1 parent b10f1eb commit 8800e9d

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

src/Metacello-GitBasedRepository/MCGitBasedNetworkRepository.class.st

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,14 @@ MCGitBasedNetworkRepository >> canUpgradeTo: anMCGitBasedRepository [
356356

357357
{ #category : 'descriptions' }
358358
MCGitBasedNetworkRepository >> description [
359-
| desc |
360-
desc := self class description , self projectPath , ':'
361-
, self projectVersionEscaped.
362-
self repoPath isEmpty
363-
ifTrue: [ ^ desc ].
364-
^ desc , '/' , self repoPath
359+
360+
| desc |
361+
desc := self class description , self projectPath.
362+
self projectVersionEscaped ifNotNil: [ :projectVersionEscaped |
363+
desc := desc , ':' , projectVersionEscaped ].
364+
365+
self repoPath isEmpty ifTrue: [ ^ desc ].
366+
^ desc , '/' , self repoPath
365367
]
366368

367369
{ #category : 'accessing' }
@@ -540,11 +542,14 @@ MCGitBasedNetworkRepository >> projectVersion: aString [
540542

541543
{ #category : 'accessing' }
542544
MCGitBasedNetworkRepository >> projectVersionEscaped [
543-
| pv |
544-
pv := self projectVersion.
545-
(projectVersion includes: $/)
546-
ifTrue: [ ^ pv copyReplaceAll: '/' with: '\/' ].
547-
^ pv
545+
546+
| pv |
547+
pv := self projectVersion.
548+
pv ifNil: [ ^ nil ].
549+
550+
(projectVersion includes: $/) ifTrue: [
551+
^ pv copyReplaceAll: '/' with: '\/' ].
552+
^ pv
548553
]
549554

550555
{ #category : 'accessing' }

0 commit comments

Comments
 (0)