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

Function resolveWorkingDirForSession

cmd/opencodereview/session_cmd.go:123–129  ·  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

121// require the target to be a git repository, so users can inspect sessions
122// even after archiving a checkout.
123func resolveWorkingDirForSession(input string) (string, error) {
124 dir, _, err := resolveWorkingDir(input, false)
125 if err != nil {
126 return "", err
127 }
128 return dir, nil
129}
130
131func printSessionTable(w io.Writer, summaries []session.Summary) {
132 tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0)

Callers 2

runSessionListFunction · 0.85
runSessionShowFunction · 0.85

Calls 1

resolveWorkingDirFunction · 0.85

Tested by

no test coverage detected