func ListHeads() (branches []string) {
	err := filepath.Walk(UGIT_DIR+"/"+BRANCH_DIR,
		func(path string, info os.FileInfo, err error) error {
			if err != nil {
				return err
			}
			if info.IsDir() {
				return nil
			}
			b := strings.Split(path, BRANCH_DIR+"/")[1]
			branches = append(branches, b)
			return nil
		})

	if err != nil {
		log.Println(err)
	}
	return branches
}
/*
ListHeads returns the list of branches in the refs/heads directory
*/
ListHeads returns the list of branches in the refs/heads directory
/ * ListHeads returns the list of branches in the refs / heads directory * /
func ListHeads() (branches []string) {
	err := filepath.Walk(UGIT_DIR+"/"+BRANCH_DIR,
		func(path string, info os.FileInfo, err error) error {
			if err != nil {
				return err
			}
			if info.IsDir() {
				return nil
			}
			b := strings.Split(path, BRANCH_DIR+"/")[1]
			branches = append(branches, b)
			return nil
		})
	if err != nil {
		log.Println(err)
	}
	return branches
}
func ListHeads ( ) ( branches [ ] string ) { err := filepath . Walk ( UGIT_DIR + " " + BRANCH_DIR , func ( path string , info os . FileInfo , err error ) error { if err != nil { return err } if info . IsDir ( ) { return nil } b := strings . Split ( path , BRANCH_DIR + " " ) [ 1 ] branches = append ( branches , b ) return nil } ) if err != nil { log . Println ( err ) } return branches }
ListHeads returns the list of branches in the refs/heads directory
ListHeads returns the list of branches in the refs / heads directory