Add support for creating signed commits and signing commits during a rebase #626

Merged
mbfr merged 25 commits from master into master 2020-08-18 11:25:31 -05:00
1 changed files with 7 additions and 2 deletions
Showing only changes of commit 1ec8a67fe4 - Show all commits

View File

@ -79,11 +79,16 @@ func (c *Commit) WithSignature(signature string, signatureField string) (*Oid, e
runtime.LockOSThread()
defer runtime.UnlockOSThread()
cTotalCommit:=C.CString(totalCommit)
cSignature := C.CString(signature)
defer C.free(unsafe.Pointer(cTotalCommit))
defer C.free(unsafe.Pointer(cSignature))
ret := C.git_commit_create_with_signature(
oid.toC(),
lhchavez commented 2020-08-14 08:43:24 -05:00 (Migrated from github.com)
Review

for consistency with Amend() would it be possible to call this variable cerr?

for consistency with [`Amend()`](https://github.com/libgit2/git2go/blob/462ebd83e0ccba9cd93c05ec12dc3d98064e3d5c/commit.go#L160) would it be possible to call this variable `cerr`?
mbfr commented 2020-08-14 09:40:57 -05:00 (Migrated from github.com)
Review

There isn't really a lot of consistency with other functions, sometimes it's called code, sometimes ret, sometimes, ecode, sometimes cerr, etc.

There isn't really a lot of consistency with other functions, sometimes it's called `code`, sometimes `ret`, sometimes, `ecode`, sometimes `cerr`, etc.
c.Owner().ptr,
C.CString(totalCommit),
C.CString(signature),
cTotalCommit,
cSignature,
csf,
)