From 4a6887f99e0be2df3deb5e94656ca649c11cb838 Mon Sep 17 00:00:00 2001 From: Jason Lunz Date: Thu, 16 Dec 2021 16:47:16 -0700 Subject: [PATCH] add a comment explaining why we build an sshUsers map --- pkg/cmd/codespace/ssh.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cmd/codespace/ssh.go b/pkg/cmd/codespace/ssh.go index 301f9b49e..7dfce6ec4 100644 --- a/pkg/cmd/codespace/ssh.go +++ b/pkg/cmd/codespace/ssh.go @@ -194,6 +194,10 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts configOptions) error return err } + // store a mapping of repository -> remote ssh username. This is + // necessary because the username can vary between codespaces, but + // since fetching it is slow, we store it here so we at least only do + // it once per repository. sshUsers := map[string]string{} for _, cs := range codespaces {