Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef071c1

Browse files
Apply suggestions from code review
Co-authored-by: Dean Sheather <[email protected]>
1 parent efbd97e commit ef071c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/gitssh.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func gitssh() *cobra.Command {
3333
defer stop()
3434

3535
// Early check so errors are reported immediately.
36-
identityFiles, err := praseIdentityFilesForHost(ctx, args, env)
36+
identityFiles, err := parseIdentityFilesForHost(ctx, args, env)
3737
if err != nil {
3838
return err
3939
}
@@ -120,21 +120,21 @@ var fallbackIdentityFiles = strings.Join([]string{
120120
"identityfile ~/.ssh/id_xmss",
121121
}, "\n")
122122

123-
// praseIdentityFilesForHost uses ssh -G to discern what SSH keys have
123+
// parseIdentityFilesForHost uses ssh -G to discern what SSH keys have
124124
// been enabled for the host (via the users SSH config) and returns a
125125
// list of existing identity files.
126126
//
127127
// We do this because when no keys are defined for a host, SSH uses
128128
// fallback keys (see above). However, by passing `-i` to attach our
129129
// private key, we're effectively disabling the fallback keys.
130130
//
131-
// Example invokation:
131+
// Example invocation:
132132
//
133133
// ssh -G -o SendEnv=GIT_PROTOCOL [email protected] git-upload-pack 'coder/coder'
134134
//
135135
// The extra arguments work without issue and lets us run the command
136136
// as-is without stripping out the excess (git-upload-pack 'coder/coder').
137-
func praseIdentityFilesForHost(ctx context.Context, args, env []string) (identityFiles []string, error error) {
137+
func parseIdentityFilesForHost(ctx context.Context, args, env []string) (identityFiles []string, error error) {
138138
home, err := os.UserHomeDir()
139139
if err != nil {
140140
return nil, xerrors.Errorf("get user home dir failed: %w", err)

0 commit comments

Comments
 (0)