MCPcopy Create free account
hub / github.com/alibaba/open-code-review / resolveWorkingDirForSession

Function resolveWorkingDirForSession

cmd/opencodereview/session_cmd.go:245–251  ·  view source on GitHub ↗

resolveWorkingDirForSession accepts an explicit --repo flag value and falls back to the current working directory. Unlike resolveRepoDir it does not require the target to be a git repository, so users can inspect sessions even after archiving a checkout.

(input string)

Source from the content-addressed store, hash-verified

243// require the target to be a git repository, so users can inspect sessions
244// even after archiving a checkout.
245func resolveWorkingDirForSession(input string) (string, error) {
246 dir, _, err := resolveWorkingDir(input, false)
247 if err != nil {
248 return "", err
249 }
250 return dir, nil
251}
252
253func printSessionTable(w io.Writer, summaries []session.Summary) {
254 tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0)

Callers 4

completeSessionIDsFunction · 0.85
runSessionListFunction · 0.85
runSessionShowFunction · 0.85
runSessionCommentsFunction · 0.85

Calls 1

resolveWorkingDirFunction · 0.85

Tested by

no test coverage detected