Example #1
0
func newTreeEntry(entry *C.git_tree_entry) *TreeEntry {
	return &TreeEntry{
		C.GoString(C.git_tree_entry_name(entry)),
		newOidFromC(C.git_tree_entry_id(entry)),
		int(C.git_tree_entry_type(entry)),
	}
}
Example #2
0
func newTreeEntry(entry *C.git_tree_entry) *TreeEntry {
	return &TreeEntry{
		C.GoString(C.git_tree_entry_name(entry)),
		newOidFromC(C.git_tree_entry_id(entry)),
		ObjectType(C.git_tree_entry_type(entry)),
		Filemode(C.git_tree_entry_filemode(entry)),
	}
}
Example #3
0
func (entry *TreeEntry) Id() *Oid {
	oid := new(Oid)
	oid.git_oid = C.git_tree_entry_id(entry.git_tree_entry)
	if oid.git_oid == nil {
		return nil
	}
	return oid
}
Example #4
0
func (e *Entry) Oid() *Oid {
	return &Oid{C.git_tree_entry_id(e.git_tree_entry)}
}