Skip to content

Commit

Permalink
Fixing for running in 1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Aug 19, 2022
1 parent ec7d6c4 commit 0e0100f
Show file tree
Hide file tree
Showing 29 changed files with 187 additions and 4 deletions.
Empty file.
64 changes: 64 additions & 0 deletions LibGit-Core.package/LGitCloneOptionsV140.class/class/fieldsDesc.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
accessing
fieldsDesc
^#(
LGitOptionsVersionsEnum version;
"
* These options are passed to the checkout step. To disable
* checkout, set the `checkout_strategy` to
* `GIT_CHECKOUT_NONE`.
"
LGitCheckoutOptions checkout_opts;
"
* Options which control the fetch, including callbacks.
*
* The callbacks are used for reporting fetch progress, and for acquiring
* credentials in the event they are needed.
"
LGitFetchOptionsV140 fetch_opts;
"
* Set to zero (false) to create a standard repo, or non-zero
* for a bare repo
"
int bare;
"
* Whether to use a fetch or copy the object database.
"
LGitCloneLocalTypeEnum local;
"
* The name of the branch to checkout. NULL means use the
* remote's default branch.
"
String checkout_branch;
"
* A callback used to create the new repository into which to
* clone. If NULL, the 'bare' field will be used to determine
* whether to create a bare repository.
"
LGitRepositoryCreateCallback repository_cb;
"
* An opaque payload to pass to the git_repository creation callback.
* This parameter is ignored unless repository_cb is non-NULL.
"
void *repository_cb_payload;
"
* A callback used to create the git_remote, prior to its being
* used to perform the clone operation. See the documentation for
* git_remote_create_cb for details. This parameter may be NULL,
* indicating that git_clone should provide default behavior.
"
LGitRemoteCreateCallback remote_cb;
"
* An opaque payload to pass to the git_remote creation callback.
* This parameter is ignored unless remote_cb is non-NULL.
"
void *remote_cb_payload;
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
libgit - calls
clone_init_options: opts version: version
^ self
ffiCall: #(LGitReturnCodeEnum git_clone_init_options(LGitCloneOptionsV120 *opts, LGitOptionsVersionsEnum version))
options: #( )
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_bare: anObject
"This method was automatically generated"
handle signedLongAt: OFFSET_PRIM_BARE put: anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_bare
"This method was automatically generated"
^handle signedLongAt: OFFSET_PRIM_BARE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_checkout_branch: anObject
"This method was automatically generated"
handle pointerAt: OFFSET_PRIM_CHECKOUT_BRANCH put: anObject getHandle.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_checkout_branch
"This method was automatically generated"
^ExternalData fromHandle: (handle pointerAt: OFFSET_PRIM_CHECKOUT_BRANCH) type: ExternalType char asPointerType
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_checkout_opts: anObject
"This method was automatically generated"
handle structAt: OFFSET_PRIM_CHECKOUT_OPTS put: anObject getHandle length: LGitCheckoutOptions byteSize
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_checkout_opts
"This method was automatically generated"
^ LGitCheckoutOptions fromHandle: (handle referenceStructAt: OFFSET_PRIM_CHECKOUT_OPTS length: LGitCheckoutOptions byteSize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_fetch_opts: anObject
"This method was automatically generated"
handle structAt: OFFSET_PRIM_FETCH_OPTS put: anObject getHandle length: LGitFetchOptionsV140 byteSize
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_fetch_opts
"This method was automatically generated"
^ LGitFetchOptionsV120 fromHandle: (handle referenceStructAt: OFFSET_PRIM_FETCH_OPTS length: LGitFetchOptionsV140 byteSize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_local: anObject
"This method was automatically generated"
handle unsignedLongAt: OFFSET_PRIM_LOCAL put: anObject value
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_local
"This method was automatically generated"
^LGitCloneLocalTypeEnum fromInteger: (handle unsignedLongAt: OFFSET_PRIM_LOCAL)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
libgit-fields
prim_remote_cb: anObject
"This method was automatically generated"
handle
pointerAt: OFFSET_PRIM_REMOTE_CB
put: (anObject
ifNotNil: [ anObject thunk asExternalAddress ]
ifNil: [ ExternalAddress null ])
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_remote_cb
"This method was automatically generated"
^LGitRemoteCreateCallback forAddress: ((handle pointerAt: OFFSET_PRIM_REMOTE_CB) asInteger)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_remote_cb_payload: anObject
"This method was automatically generated"
handle pointerAt: OFFSET_PRIM_REMOTE_CB_PAYLOAD put: anObject getHandle.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_remote_cb_payload
"This method was automatically generated"
^ExternalData fromHandle: (handle pointerAt: OFFSET_PRIM_REMOTE_CB_PAYLOAD) type: ExternalType void asPointerType
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
libgit-fields
prim_repository_cb: anObject
"This method was automatically generated"
handle
pointerAt: OFFSET_PRIM_REPOSITORY_CB
put: (anObject
ifNotNil: [ anObject thunk asExternalAddress ]
ifNil: [ ExternalAddress null ])
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_repository_cb
"This method was automatically generated"
^LGitRepositoryCreateCallback forAddress: ((handle pointerAt: OFFSET_PRIM_REPOSITORY_CB) asInteger)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_repository_cb_payload: anObject
"This method was automatically generated"
handle pointerAt: OFFSET_PRIM_REPOSITORY_CB_PAYLOAD put: anObject getHandle.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_repository_cb_payload
"This method was automatically generated"
^ExternalData fromHandle: (handle pointerAt: OFFSET_PRIM_REPOSITORY_CB_PAYLOAD) type: ExternalType void asPointerType
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_version: anObject
"This method was automatically generated"
handle unsignedLongAt: OFFSET_PRIM_VERSION put: anObject value
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
libgit-fields
prim_version
"This method was automatically generated"
^LGitOptionsVersionsEnum fromInteger: (handle unsignedLongAt: OFFSET_PRIM_VERSION)
22 changes: 22 additions & 0 deletions LibGit-Core.package/LGitCloneOptionsV140.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"commentStamp" : "",
"super" : "LGitAbstractCloneOptions",
"category" : "LibGit-Core-FFI-Structs",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [
"OFFSET_PRIM_BARE",
"OFFSET_PRIM_CHECKOUT_BRANCH",
"OFFSET_PRIM_CHECKOUT_OPTS",
"OFFSET_PRIM_FETCH_OPTS",
"OFFSET_PRIM_LOCAL",
"OFFSET_PRIM_REMOTE_CB",
"OFFSET_PRIM_REMOTE_CB_PAYLOAD",
"OFFSET_PRIM_REPOSITORY_CB",
"OFFSET_PRIM_REPOSITORY_CB_PAYLOAD",
"OFFSET_PRIM_VERSION"
],
"instvars" : [ ],
"name" : "LGitCloneOptionsV140",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing - platform
macLibraryName

^ FFIMacLibraryFinder findAnyLibrary: #('libgit2.1.0.1.dylib' 'libgit2.1.0.0.dylib' 'libgit2.0.25.1.dylib')
^ FFIMacLibraryFinder findAnyLibrary: #(''libgit2.1.4.4.dylib'' 'libgit2.1.0.1.dylib' 'libgit2.1.0.0.dylib' 'libgit2.0.25.1.dylib')
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ accessing - platform
unix32LibraryName

^ FFIUnix32LibraryFinder findAnyLibrary: #(
'libgit2.so.1.4.4'
"This name is wrong, but some versions of the VM has this library shipped with the bad name"
'libgit2.1.0.0.so'
'libgit2.so.1.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ unix64LibraryName

^ FFIUnix64LibraryFinder findAnyLibrary: #(
"This name is wrong, but some versions of the VM has this library shipped with the bad name"
'libgit2.so.1.4.4'
'libgit2.1.0.0.so'
'libgit2.so.1.0.0'
'libgit2.so.1.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing - platform
win32LibraryName

^ FFIWindowsLibraryFinder findAnyLibrary: #('libgit2-1-0-0.dll' 'libgit2.dll')
^ FFIWindowsLibraryFinder findAnyLibrary: #('libgit2-1-4-4.dll' 'libgit2-1-0-0.dll' 'libgit2.dll')
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ cloneOptionsStructureClass
(self ffiLibrary uniqueInstance isVersionLessThan: #(1))
ifTrue: [ ^ LGitCloneOptionsV02x ].
(self ffiLibrary uniqueInstance isVersionLessThan: #(1 2))
ifTrue: [ ^ LGitCloneOptionsV100 ].
ifTrue: [ ^ LGitCloneOptionsV100 ].
(self ffiLibrary uniqueInstance isVersionLessThan: #(1 4))
ifTrue: [ ^ LGitCloneOptionsV120 ].

^ LGitCloneOptionsV120
^ LGitCloneOptionsV140

0 comments on commit 0e0100f

Please sign in to comment.