code: func checkoutNonBare(l *tasklog.Logger) error {
  	if bare, _ := git.IsBare(); bare {
  		return nil
  	}
  
  	t := l.Waiter("migrate: checkout")
  	defer t.Complete()
  
  	return git.Checkout("", nil, true)
  }
docs: // checkoutNonBare forces a checkout of the current reference, so long as the
  // repository is non-bare.
  //
  // It returns nil on success, and a non-nil error on failure.