Skip to content

Commit

Permalink
Quotes error refs
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Mar 8, 2025
1 parent 3760823 commit c09be6d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/env/node/gk/cli/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ export class CliCommandHandlers implements Disposable {
if (ref1) {
if (!(await repo.git.refs().validateReference(ref1))) {
void executeCommand('gitlens.compareWith');
return { stderr: `${ref1} is an invalid reference` };
return { stderr: `'${ref1}' is an invalid reference` };
}
}

if (ref2) {
if (!(await repo.git.refs().validateReference(ref2))) {
void executeCommand<CompareWithCommandArgs>('gitlens.compareWith', { ref1: ref1 });
return { stderr: `${ref2} is an invalid reference` };
return { stderr: `'${ref2}' is an invalid reference` };
}
}

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

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

if (ref && !reference) {
return { stderr: `${ref} is an invalid reference` };
return { stderr: `'${ref}' is an invalid reference` };
}
}

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

if (ref && !reference) {
return { stderr: `${ref} is an invalid reference` };
return { stderr: `'${ref}' is an invalid reference` };
}
}
}

0 comments on commit c09be6d

Please sign in to comment.