func MapOidRefs() (oidRefs map[string][]string) {
	searchPath := UGIT_DIR + "/" + REF_DIR
	oidRefs = map[string][]string{}
	headRef, _ := GetHead()
	headOid, err := GetRef(headRef)
	if err != nil {
		headOid = headRef
	}
	oidRefs[headOid] = append([]string{}, "HEAD")

	err = filepath.Walk(
		searchPath,
		func(path string, info os.FileInfo, err error) error {
			if info.IsDir() {
				return nil
			}
			log.Println(path)
			rpath, _ := filepath.Rel(UGIT_DIR, path)
			oid, err := GetRef(rpath)
			if err != nil {
				return err
			}
			if strings.Contains(path, TAG_DIR) {
				rpath, _ = filepath.Rel(UGIT_DIR+"/"+TAG_DIR, path)
			} else if strings.Contains(path, BRANCH_DIR) {
				rpath, _ = filepath.Rel(UGIT_DIR+"/"+BRANCH_DIR, path)
			}
			oidRefs[oid] = append(oidRefs[oid], rpath)
			return nil
		})
	if err != nil {
		log.Println(err)
	}
	return oidRefs
}
/*
MapOidRefs returns a index of oid and its associated references
*/
MapOidRefs returns a index of oid and its associated references
/ * MapOidRefs returns a index of oid and its associated references * /
func MapOidRefs() (oidRefs map[string][]string) {
	searchPath := UGIT_DIR + "/" + REF_DIR
	oidRefs = map[string][]string{}
	headRef, _ := GetHead()
	headOid, err := GetRef(headRef)
	if err != nil {
		headOid = headRef
	}
	oidRefs[headOid] = append([]string{}, "HEAD")
	err = filepath.Walk(
		searchPath,
		func(path string, info os.FileInfo, err error) error {
			if info.IsDir() {
				return nil
			}
			log.Println(path)
			rpath, _ := filepath.Rel(UGIT_DIR, path)
			oid, err := GetRef(rpath)
			if err != nil {
				return err
			}
			if strings.Contains(path, TAG_DIR) {
				rpath, _ = filepath.Rel(UGIT_DIR+"/"+TAG_DIR, path)
			} else if strings.Contains(path, BRANCH_DIR) {
				rpath, _ = filepath.Rel(UGIT_DIR+"/"+BRANCH_DIR, path)
			}
			oidRefs[oid] = append(oidRefs[oid], rpath)
			return nil
		})
	if err != nil {
		log.Println(err)
	}
	return oidRefs
}
func MapOidRefs ( ) ( oidRefs map [ string ] [ ] string ) { searchPath := UGIT_DIR + " " + REF_DIR oidRefs = map [ string ] [ ] string { } headRef , _ := GetHead ( ) headOid , err := GetRef ( headRef ) if err != nil { headOid = headRef } oidRefs [ headOid ] = append ( [ ] string { } , " " ) err = filepath . Walk ( searchPath , func ( path string , info os . FileInfo , err error ) error { if info . IsDir ( ) { return nil } log . Println ( path ) rpath , _ := filepath . Rel ( UGIT_DIR , path ) oid , err := GetRef ( rpath ) if err != nil { return err } if strings . Contains ( path , TAG_DIR ) { rpath , _ = filepath . Rel ( UGIT_DIR + " " + TAG_DIR , path ) } else if strings . Contains ( path , BRANCH_DIR ) { rpath , _ = filepath . Rel ( UGIT_DIR + " " + BRANCH_DIR , path ) } oidRefs [ oid ] = append ( oidRefs [ oid ] , rpath ) return nil } ) if err != nil { log . Println ( err ) } return oidRefs }
MapOidRefs returns a index of oid and its associated references
MapOidRefs returns a index of oid and its associated references