Rebase wrapper #332
20
rebase.go
|
@ -81,6 +81,25 @@ func (r *Repository) RebaseInit(branch *AnnotatedCommit, upstream *AnnotatedComm
|
|||
|
||||
return newRebaseFromC(ptr), nil
|
||||
}
|
||||
|
||||
//RebaseOpen opens an existing rebase that was previously started by either an invocation of git_rebase_init or by another client.
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
func (r *Repository) RebaseOpen(opts *RebaseOptions) (*Rebase, error) {
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
runtime.LockOSThread()
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
defer runtime.UnlockOSThread()
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
//TODO : use real rebase_options
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
if opts != nil {
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
return nil, errors.New("RebaseOptions Not implemented yet, use nil for default opts")
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
var ptr *C.git_rebase
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
err := C.git_rebase_open(&ptr, r.ptr, nil)
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
if err < 0 {
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
return nil, MakeGitError(err)
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() This looks like it should have a much more generic name, since what it does is unrelated to note rewriting and it's simply mapping an empty string and This looks like it should have a much more generic name, since what it does is unrelated to note rewriting and it's simply mapping an empty string and `NULL`.
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() I understand your point. Renamed to mapEmptyStringToNull :p I understand your point. Renamed to mapEmptyStringToNull :p
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
return newRebaseFromC(ptr), nil
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
}
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
// OperationAt gets the rebase operation specified by the given index.
|
||||
func (rebase *Rebase) OperationAt(index uint) *RebaseOperation {
|
||||
operation := C.git_rebase_operation_byindex(rebase.ptr, C.size_t(index))
|
||||
|
@ -183,6 +202,5 @@ func newRebaseFromC(ptr *C.git_rebase) *Rebase {
|
|||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done Done
|
||||
/* TODO -- Add last wrapper services and manage rebase_options
|
||||
|
||||
![]() This leaks the committer signature. This leaks the committer signature.
![]() Oups! Oups!
Done
|
||||
int git_rebase_init_options(git_rebase_options *opts, unsigned int version);
|
||||
int git_rebase_open(git_rebase **out, git_repository *repo, const git_rebase_options *opts);
|
||||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
|
||||
|
||||
*/
|
||||
|
|
|||
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it. This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() We have prior art of naming We have prior art of naming `git_repository_init()` as `InitRepository()` since the namespacing in C and Go is bit different, so this should be called `InitRebase()`.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() Like with the init function, this should be called Like with the init function, this should be called `OpenRebase()`. The documentation shouldn't reference the C function `git_rebase_init` but our own.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() This return value does not match how Go reports errors. I would expect a This return value does not match how Go reports errors. I would expect a `uint` to return the current operation and an `error` to return any errors.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `GIT_REBASE_OPERATION_EXEC` in git2go, it's `RebaseOperationExec`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() There is no There is no `git_rebase_next` in git2go, we have `Next()`.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there. Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() The other public id fields are named The other public id fields are named `Id`.
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Ok, I followed go convention suggested by my IDE plugin Ok, I followed go convention suggested by my IDE plugin
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done. Done.
I also added `ErrClassRebase` in `git.go`
Hope this is correct
![]() Done Done
![]() Done Done
![]() Done Done
![]() Done Done
|
|
@ -87,8 +87,14 @@ func TestRebaseNoConflicts(t *testing.T) {
|
|||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
defer cleanupTestRepo(t, repo)
|
||||
seedTestRepo(t, repo)
|
||||
|
||||
// Try to open existing rebase
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
oRebase, err := repo.RebaseOpen(nil)
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
if err == nil {
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
t.Fatal("Did not expect to find a rebase in progress")
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
}
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
// Setup a repo with 2 branches and a different tree
|
||||
err := setupRepoForRebase(repo, masterCommit, branchName)
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
err = setupRepoForRebase(repo, masterCommit, branchName)
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
checkFatal(t, err)
|
||||
|
||||
// Create several commits in emile
|
||||
|
@ -102,6 +108,14 @@ func TestRebaseNoConflicts(t *testing.T) {
|
|||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
checkFatal(t, err)
|
||||
defer rebase.Free()
|
||||
|
||||
// Open existing rebase
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
oRebase, err = repo.RebaseOpen(nil)
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
checkFatal(t, err)
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
defer oRebase.Free()
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
if oRebase == nil {
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
t.Fatal("Expected to find an existing rebase in progress")
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
}
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
|
||||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
||||
// Finish the rebase properly
|
||||
err = rebase.Finish()
|
||||
checkFatal(t, err)
|
||||
|
|
|||
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Don't hard-code 1 here, the point of the version field is to increase it. Don't hard-code 1 here, the point of the version field is to increase it.
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a Not sure how to handle this. It's a test that checks the default version returned by DefaultRebaseOptions. After a look into C code, I thought it was a `#define` or a constant that was used as default version number.
The test doesn't have great value though
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() The version it needs to return in the version that is specified by the libgit2 headers in the The version it needs to return in the version that is specified by the libgit2 headers in the `#define`. That's what the compiler is building and that's what it will use in order to figure out the size of the struct, which has to match what we're telling libgit2 we have.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
![]() Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think. Thanks for that. However I'm not sure how I should do as the cgo feature seems to be forbidden in tests... I will just drop this very low value test I think.
|
This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
This describes the structure mechanically, but almost everything is a wrapper, if we're going to have a comment here, it should describe the object itself and/or what you can do with it.
We have prior art of naming
git_repository_init()
asInitRepository()
since the namespacing in C and Go is bit different, so this should be calledInitRebase()
.We have prior art of naming
git_repository_init()
asInitRepository()
since the namespacing in C and Go is bit different, so this should be calledInitRebase()
.Like with the init function, this should be called
OpenRebase()
. The documentation shouldn't reference the C functiongit_rebase_init
but our own.Like with the init function, this should be called
OpenRebase()
. The documentation shouldn't reference the C functiongit_rebase_init
but our own.This return value does not match how Go reports errors. I would expect a
uint
to return the current operation and anerror
to return any errors.This return value does not match how Go reports errors. I would expect a
uint
to return the current operation and anerror
to return any errors.There is no
GIT_REBASE_OPERATION_EXEC
in git2go, it'sRebaseOperationExec
.There is no
GIT_REBASE_OPERATION_EXEC
in git2go, it'sRebaseOperationExec
.There is no
git_rebase_next
in git2go, we haveNext()
.There is no
git_rebase_next
in git2go, we haveNext()
.Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
Missing space. The pointer isn't public so let's not mention it. "unmanaged resources" covers whatever we decide to put in there.
The other public id fields are named
Id
.The other public id fields are named
Id
.Ok, I followed go convention suggested by my IDE plugin
Ok, I followed go convention suggested by my IDE plugin
Done
Done
Done
Done
Done
Done
Done.
I also added
ErrClassRebase
ingit.go
Hope this is correct
Done.
I also added
ErrClassRebase
ingit.go
Hope this is correct
Done
Done
Done
Done