Example #1
0
func (commit *Commit) Id() *Oid {
	oid := new(Oid)
	oid.git_oid = C.git_commit_id(commit.git_commit)
	if oid.git_oid == nil {
		return nil
	}
	return oid
}
Example #2
0
func (c *Commit) Id() *Oid {
	return newOidFromC(C.git_commit_id(c.ptr))
}
Example #3
0
File: git.go Project: fsouza/gogit
// Id returns the hash of the commit.
func (c *Commit) Id() string {
	oid := C.git_commit_id(c.commit)
	defer C.free(unsafe.Pointer(oid))
	return oidToString(oid)
}
Example #4
0
func (o gitObject) Id() *Oid {
	return newOidFromC(C.git_commit_id(o.ptr))
}