Skip to content

Commit c09be6d

Browse files
committed
Quotes error refs
1 parent 3760823 commit c09be6d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/env/node/gk/cli/commands.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ export class CliCommandHandlers implements Disposable {
9090
if (ref1) {
9191
if (!(await repo.git.refs().validateReference(ref1))) {
9292
void executeCommand('gitlens.compareWith');
93-
return { stderr: `${ref1} is an invalid reference` };
93+
return { stderr: `'${ref1}' is an invalid reference` };
9494
}
9595
}
9696

9797
if (ref2) {
9898
if (!(await repo.git.refs().validateReference(ref2))) {
9999
void executeCommand<CompareWithCommandArgs>('gitlens.compareWith', { ref1: ref1 });
100-
return { stderr: `${ref2} is an invalid reference` };
100+
return { stderr: `'${ref2}' is an invalid reference` };
101101
}
102102
}
103103

@@ -115,7 +115,7 @@ export class CliCommandHandlers implements Disposable {
115115
const reference = await repo.git.refs().getReference(ref);
116116
if (ref && !reference) {
117117
void executeCommand('gitlens.showInCommitGraph', repo);
118-
return { stderr: `${ref} is an invalid reference` };
118+
return { stderr: `'${ref}' is an invalid reference` };
119119
}
120120

121121
void executeCommand('gitlens.showInCommitGraph', { ref: reference });
@@ -131,7 +131,7 @@ export class CliCommandHandlers implements Disposable {
131131
void merge(repo, reference);
132132

133133
if (ref && !reference) {
134-
return { stderr: `${ref} is an invalid reference` };
134+
return { stderr: `'${ref}' is an invalid reference` };
135135
}
136136
}
137137

@@ -145,7 +145,7 @@ export class CliCommandHandlers implements Disposable {
145145
void rebase(repo, reference);
146146

147147
if (ref && !reference) {
148-
return { stderr: `${ref} is an invalid reference` };
148+
return { stderr: `'${ref}' is an invalid reference` };
149149
}
150150
}
151151
}

0 commit comments

Comments
 (0)