From e439b931a6b23a84fd0d32114b25a9dd5e08ac29 Mon Sep 17 00:00:00 2001 From: Mark Probst Date: Wed, 4 Mar 2015 11:39:35 -0800 Subject: Default signature --- branch.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'branch.go') diff --git a/branch.go b/branch.go index 54b01fb..22b767e 100644 --- a/branch.go +++ b/branch.go @@ -96,7 +96,10 @@ func (repo *Repository) CreateBranch(branchName string, target *Commit, force bo cBranchName := C.CString(branchName) cForce := cbool(force) - cSignature := signature.toC() + cSignature, err := signature.toC() + if err != nil { + return nil, err + } defer C.git_signature_free(cSignature) var cmsg *C.char @@ -133,7 +136,10 @@ func (b *Branch) Move(newBranchName string, force bool, signature *Signature, ms cNewBranchName := C.CString(newBranchName) cForce := cbool(force) - cSignature := signature.toC() + cSignature, err := signature.toC() + if err != nil { + return nil, err + } defer C.git_signature_free(cSignature) var cmsg *C.char -- cgit v1.2.3