Exemple #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
}
Exemple #2
0
func (c *Commit) Id() *Oid {
	return newOidFromC(C.git_commit_id(c.ptr))
}
Exemple #3
0
// 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)
}
Exemple #4
0
func (o gitObject) Id() *Oid {
	return newOidFromC(C.git_commit_id(o.ptr))
}