Add func (c Commit) Time() time.Time #410

Closed
ervinoro wants to merge 2 commits from v25 into v25
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 44c1f328ad - Show all commits

View File

@ -17,7 +17,7 @@ func (repo *Repository) DescendantOf(commit, ancestor *Oid) (bool, error) {
return false, MakeGitError(ret)
}
return (ret > 0), nil
return ret > 0, nil
}
func (repo *Repository) AheadBehind(local, upstream *Oid) (ahead, behind int, err error) {

2
odb.go
View File

@ -236,7 +236,7 @@ func (object *OdbObject) Data() (data []byte) {
len := int(C.git_odb_object_size(object.ptr))
sliceHeader := (*reflect.SliceHeader)((unsafe.Pointer(&blob)))
sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&blob))
sliceHeader.Cap = len
sliceHeader.Len = len
sliceHeader.Data = uintptr(c_blob)

View File

@ -11,9 +11,9 @@ type pathPair struct {
func TestSearchPath(t *testing.T) {
paths := []pathPair{
pathPair{ConfigLevelSystem, "/tmp/system"},
pathPair{ConfigLevelGlobal, "/tmp/global"},
pathPair{ConfigLevelXDG, "/tmp/xdg"},
{ConfigLevelSystem, "/tmp/system"},
{ConfigLevelGlobal, "/tmp/global"},
{ConfigLevelXDG, "/tmp/xdg"},
}
for _, pair := range paths {