Skip to content

Commit 4a6887f

Browse files
committed
add a comment explaining why we build an sshUsers map
1 parent 6f8635a commit 4a6887f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cmd/codespace/ssh.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts configOptions) error
194194
return err
195195
}
196196

197+
// store a mapping of repository -> remote ssh username. This is
198+
// necessary because the username can vary between codespaces, but
199+
// since fetching it is slow, we store it here so we at least only do
200+
// it once per repository.
197201
sshUsers := map[string]string{}
198202

199203
for _, cs := range codespaces {

0 commit comments

Comments
 (0)