func CreateBranch(branch string, oid string) error {
	if oid == "" {
		return errors.New("Cannot create a branch using an empty oid / ref. You should create one before")
	}
	branch = fmt.Sprintf("%s/%s", storage.BRANCH_DIR, branch)

	if _, err := storage.GetRef(branch); err != nil {
		err = storage.SetRef(branch, oid)
		return err
	}

	return errors.New("This Branch already exists")
}
/*
CreateBranch write the oid into a new branch file
*/
CreateBranch write the oid into a new branch file
/ * CreateBranch write the oid into a new branch file * /
func CreateBranch(branch string, oid string) error {
	if oid == "" {
		return errors.New("Cannot create a branch using an empty oid / ref. You should create one before")
	}
	branch = fmt.Sprintf("%s/%s", storage.BRANCH_DIR, branch)
	if _, err := storage.GetRef(branch); err != nil {
		err = storage.SetRef(branch, oid)
		return err
	}
	return errors.New("This Branch already exists")
}
func CreateBranch ( branch string , oid string ) error { if oid == " " { return errors . New ( " " ) } branch = fmt . Sprintf ( " " , storage . BRANCH_DIR , branch ) if _ , err := storage . GetRef ( branch ) ; err != nil { err = storage . SetRef ( branch , oid ) return err } return errors . New ( " " ) }
CreateBranch write the oid into a new branch file
CreateBranch write the oid into a new branch file