Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep committed Jun 26, 2018
1 parent caade18 commit 0af37b1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
private
splitRootAndSubdirectoryFromLocation
| root subDir |

(self location beginsWith: (self class type, '://'))
ifFalse: [ self error: 'Invalid URL (It should be ', self class type, '://...)' ].
root := (self location allButFirst: self class type size + 3) asFileReference.
subDir := #().
[ root isNil or: [ self isGitRoot: root ] ]
[ root isRoot or: [ self isGitRoot: root ] ]
whileFalse: [
(root asAbsolute = FileSystem workingDirectory)
ifFalse: [ subDir := subDir copyWithFirst: root basename ].
root := root parent ].
root ifNil: [ self error: 'I can''t find a .git/config file.' ].
1halt.
root isRoot ifTrue: [ self error: 'I can''t find a .git/config file.' ].

^ {
root. "a FileReference"
Expand Down

0 comments on commit 0af37b1

Please sign in to comment.