--- a/git/GitRepository.st Wed Sep 19 14:47:53 2012 +0000
+++ b/git/GitRepository.st Wed Sep 19 18:10:20 2012 +0000
@@ -11,7 +11,7 @@
!GitRepository class methodsFor:'instance creation'!
clone: url to: stringOrDirectory
- | dir ref fetchStats checkoutStats |
+ | dir ref fetchStats checkoutStats options |
dir := stringOrDirectory asFilename.
dir exists ifTrue:[
@@ -26,8 +26,10 @@
ref := ByteArray new: ExternalBytes sizeofPointer.
fetchStats := GitIndexerStatsStructure new.
checkoutStats := GitIndexerStatsStructure new.
+ options := GitCheckoutOptions new.
+ options strategyCreateMissing.
GitError raiseIfError:
- (GitPrimitives prim_git_clone: ref origin_url: url asString workdir_path: dir pathName fetch_stats: fetchStats checkout_stats: checkoutStats checkout_opts: ExternalAddress new).
+ (GitPrimitives prim_git_clone: ref origin_url: url asString workdir_path: dir pathName fetch_stats: fetchStats checkout_stats: checkoutStats checkout_opts: options).
^self new
setHandleFromRef:ref;
setPath: dir pathName;
@@ -201,14 +203,16 @@
!GitRepository methodsFor:'private-operations'!
checkout: object
- | err stats |
+ | err stats options |
object isGitTreeish ifFalse:[
GitError raiseErrorString:'Invalid argument: ', object printString.
^self.
].
stats := GitIndexerStatsStructure new.
- err := GitPrimitives prim_git_checkout_tree: handle treeish: object getHandle opts: ExternalAddress new stats: stats.
+ options := GitCheckoutOptions new.
+ options strategyCreateMissing.
+ err := GitPrimitives prim_git_checkout_tree: handle treeish: object getHandle opts: options stats: stats.
GitError raiseIfError: err.
"Created: / 19-09-2012 / 09:52:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"