Skip to content

Commit

Permalink
Improve isRemoteRef: check
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Dec 8, 2023
1 parent bebe72c commit 733b343
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
refs
isRemoteRef: aString
^ aString beginsWith: self remoteRefBaseName
^ (aString beginsWith: self remoteRefBaseName)
and: [(aString occurrencesOf: $/) >= ((self remoteRefBaseName occurrencesOf: $/) + 1)]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ splitRemoteRef: aString
self assert: (self isRemoteRef: aString) description: aString, ' is not a remote ref'.
parts := aString allButFirst: self remoteRefBaseName size.
index := parts indexOf: $/.
self assert: index >= 1 description: aString, ' is not a valid remote ref'.
remoteName := parts first: index - 1.
remoteRef := parts allButFirst: index.
^ remoteName -> remoteRef
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"isImageClean" : "mad 11/7/2023 15:17",
"isReferencedByHead:" : "mad 10/16/2023 22:52",
"isRegistered" : "mad 9/19/2023 13:49",
"isRemoteRef:" : "mad 11/29/2023 16:08",
"isRemoteRef:" : "mad 12/8/2023 19:47",
"isSomeHead:" : "mad 10/16/2023 22:53",
"isSqueakBranchRef:" : "mad 6/4/2023 16:10",
"isSqueakRef:" : "mad 9/18/2023 13:58",
Expand Down Expand Up @@ -134,7 +134,7 @@
"serializeChangeSets:onCommit:" : "mad 9/20/2023 12:45",
"setUpstreamRemoteName:andRef:for:" : "mad 9/18/2023 20:01",
"setUpstreamRemoteNameAndRef:for:" : "mad 12/8/2023 19:31",
"splitRemoteRef:" : "mad 12/8/2023 19:28",
"splitRemoteRef:" : "mad 12/8/2023 19:45",
"unitOfWork" : "mad 6/3/2023 14:15",
"unmappedReferencesIn:do:" : "mad 10/21/2023 23:37",
"unregister" : "mad 9/19/2023 12:07",
Expand Down

0 comments on commit 733b343

Please sign in to comment.