embrace static types

This commit is contained in:
CMGS 2014-08-28 15:40:21 +08:00
parent e5e9636ce0
commit 2f93ce39cc
1 changed files with 1 additions and 17 deletions

View File

@ -98,23 +98,7 @@ func (v *Repository) CheckoutIndex(index *Index, opts *CheckoutOpts) error {
return nil
}
func (v *Repository) CheckoutTree(treeish string, opts *CheckoutOpts) error {
obj, err := v.RevparseSingle(treeish)
if err != nil {
return err
}
defer obj.Free()
commit, err := v.LookupCommit(obj.Id())
if err != nil {
return err
}
tree, err := commit.Tree()
if err != nil {
return err
}
func (v *Repository) CheckoutTree(tree *Tree, opts *CheckoutOpts) error {
runtime.LockOSThread()
defer runtime.UnlockOSThread()