Skip to content

Commit 52a40c9

Browse files
committed
servegit: link to documentation in output
1 parent f4facb0 commit 52a40c9

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

cmd/src/servegit.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ By default 'src serve-git' will recursively serve your current directory on the
2323
2424
'src serve-git -list' will not start up the server. Instead it will write to stdout a list of
2525
repository names it would serve.
26+
27+
Documentation at https://docs.sourcegraph.com/admin/external_service/src_serve_git
2628
`)
2729
}
2830
var (

internal/servegit/serve.go

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -203,23 +203,9 @@ func (s *Serve) Repos() ([]Repo, error) {
203203
}
204204

205205
func explainAddr(addr string) string {
206-
_, port, err := net.SplitHostPort(addr)
207-
if err != nil {
208-
port = "3434"
209-
}
210-
211206
return fmt.Sprintf(`Serving the repositories at http://%s.
212207
213-
FIRST RUN NOTE: If 'src serve-git' has not yet been setup on Sourcegraph, then you
214-
need to configure Sourcegraph to sync with 'src serve-git'. Paste the following
215-
configuration as an Other External Service in Sourcegraph:
216-
217-
{
218-
// url is the http url to 'src serve-git' (listening on %s)
219-
// url should be reachable by Sourcegraph.
220-
// "http://host.docker.internal:%s" works from Sourcegraph when using Docker for Desktop.
221-
"url": "http://host.docker.internal:%s",
222-
"repos": ["src-expose"] // This may change in versions later than 3.9
223-
}
224-
`, addr, addr, port, port)
208+
See https://docs.sourcegraph.com/admin/external_service/src_serve_git for
209+
instructions to configure in Sourcegraph.
210+
`, addr)
225211
}

0 commit comments

Comments
 (0)