Bläddra i källkod

Fixes #1512 - tag cmd can add an extra `-m` flag

main
Eric Amodio 3 år sedan
förälder
incheckning
ea8a97847e
2 ändrade filer med 6 tillägg och 1 borttagningar
  1. +1
    -0
      CHANGELOG.md
  2. +5
    -1
      src/commands/git/tag.ts

+ 1
- 0
CHANGELOG.md Visa fil

@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#1512](https://github.com/eamodio/vscode-gitlens/issues/1512) - Git tag command can add an extra `-m`
- Fixes [#1402](https://github.com/eamodio/vscode-gitlens/issues/1402) - File history missing commits from other branches
## [11.4.1] - 2021-04-14

+ 5
- 1
src/commands/git/tag.ts Visa fil

@ -251,6 +251,10 @@ export class TagGitCommand extends QuickCommand {
state.message = result;
}
if (state.message.length !== 0 && !state.flags.includes('-m')) {
state.flags.push('-m');
}
if (this.confirm(state.confirm)) {
const result = yield* this.createCommandConfirmStep(state, context);
if (result === StepResult.Break) continue;
@ -261,7 +265,7 @@ export class TagGitCommand extends QuickCommand {
QuickCommand.endSteps(state);
void state.repo.tag(
...state.flags,
...(state.message.length !== 0 ? ['-m', `"${state.message}"`] : []),
...(state.message.length !== 0 ? [`"${state.message}"`] : []),
state.name,
state.reference.ref,
);

Laddar…
Avbryt
Spara