func tryPin(s sayer, path string, sh *shell.Shell) error { out, err := sh.Refs(path, true) if err != nil { return fmt.Errorf("failed to grab refs for %s: %s", path, err) } // throw away results for _ = range out { } err = sh.Pin(path) if err != nil { return fmt.Errorf("failed to pin %s: %s", path, err) } return nil }