func GetOid(ref string) (oid string, fullref string) {
	refsToTry := []string{
		fmt.Sprintf("%s", ref),
		fmt.Sprintf("%s/%s", storage.REF_DIR, ref),
		fmt.Sprintf("%s/%s", storage.TAG_DIR, ref),
		fmt.Sprintf("%s/%s", storage.BRANCH_DIR, ref),
	}
	for _, fullref := range refsToTry {
		if oid, err := storage.GetRef(fullref); err == nil {
			return oid, fullref
		}
	}
	if _, _, _, err := GetCommit(ref); err != nil {
		log.Printf("The ref or commit %s does not exist. Error %s\n", ref, err)
		return "", ""
	}
	oid = ref
	return oid, ref
}
/*
GetOid find the oid of a commit, a reference, or a tag
*/
GetOid find the oid of a commit, a reference, or a tag
/ * GetOid find the oid of a commit a reference or a tag * /
func GetOid(ref string) (oid string, fullref string) {
	refsToTry := []string{
		fmt.Sprintf("%s", ref),
		fmt.Sprintf("%s/%s", storage.REF_DIR, ref),
		fmt.Sprintf("%s/%s", storage.TAG_DIR, ref),
		fmt.Sprintf("%s/%s", storage.BRANCH_DIR, ref),
	}
	for _, fullref := range refsToTry {
		if oid, err := storage.GetRef(fullref); err == nil {
			return oid, fullref
		}
	}
	if _, _, _, err := GetCommit(ref); err != nil {
		log.Printf("The ref or commit %s does not exist. Error %s\n", ref, err)
		return "", ""
	}
	oid = ref
	return oid, ref
}
func GetOid ( ref string ) ( oid string , fullref string ) { refsToTry := [ ] string { fmt . Sprintf ( " " , ref ) , fmt . Sprintf ( " " , storage . REF_DIR , ref ) , fmt . Sprintf ( " " , storage . TAG_DIR , ref ) , fmt . Sprintf ( " " , storage . BRANCH_DIR , ref ) , } for _ , fullref := range refsToTry { if oid , err := storage . GetRef ( fullref ) ; err == nil { return oid , fullref } } if _ , _ , _ , err := GetCommit ( ref ) ; err != nil { log . Printf ( " \n " , ref , err ) return " " , " " } oid = ref return oid , ref }
GetOid find the oid of a commit, a reference, or a tag
GetOid find the oid of a commit a reference or a tag