Exemple #1
0
func dumpObjectSize(hash string) error {
	o, err := ggit.LookupObject(hash)
	if err != nil {
		return err
	}
	fmt.Println(o.Size)
	return nil
}
Exemple #2
0
func dumpObjectType(hash string) error {
	o, err := ggit.LookupObject(hash)
	if err != nil {
		return err
	}
	fmt.Println(o.ObjectType)
	o.Close()
	return nil
}
Exemple #3
0
func dumpPrettyPrint(hash string) error {
	o, err := ggit.LookupObject(hash)
	if err != nil {
		return err
	}
	if o.ObjectType == "tree" {
		recurse, dirsOnly := false, false
		dumpTree(hash, recurse, dirsOnly)
		return nil
	} else {
		return dumpPrettyPrintObject(o)
	}
}