-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13cfbaf
commit 290064a
Showing
3 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
Iceberg-Tests.package/IceRepositoryTest.class/instance/testCloneOntoExistingDirectory.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
tests - create repository | ||
testCloneOntoExistingDirectory | ||
| location | | ||
|
||
location := repository location. | ||
location ensureCreateDirectory. | ||
|
||
repository createRepository. | ||
self assert: (location / '.git') exists. | ||
|
5 changes: 2 additions & 3 deletions
5
Iceberg.package/IceMCGitRepository.class/instance/validate.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
initialize local repository | ||
validate | ||
"TODO: More validations are needed, see: https://github.com/npasserini/iceberg/issues/27." | ||
(self isGitRepository: directory) | ||
ifFalse: [ MCFileTreeGitError new | ||
signal: 'is not a git repository: ' , directory ]. | ||
(((self repositoryDirectory / '.git') exists) and: [self isGitRepository: self repositoryDirectory ]) | ||
ifFalse: [ MCFileTreeGitError new signal: 'is not a git repository: ' , directory ]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters