Skip to content

Commit

Permalink
fixes #39048
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Sep 18, 2018
1 parent 3cc3b14 commit 31419e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions extensions/git/package.json
Expand Up @@ -220,6 +220,11 @@
"title": "%command.commitAllAmend%",
"category": "Git"
},
{
"command": "git.restoreCommitTemplate",
"title": "%command.restoreCommitTemplate%",
"category": "Git"
},
{
"command": "git.undoCommit",
"title": "%command.undoCommit%",
Expand Down Expand Up @@ -476,6 +481,10 @@
"command": "git.commitAllAmend",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.restoreCommitTemplate",
"when": "false"
},
{
"command": "git.undoCommit",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
Expand Down
1 change: 1 addition & 0 deletions extensions/git/package.nls.json
Expand Up @@ -28,6 +28,7 @@
"command.commitAll": "Commit All",
"command.commitAllSigned": "Commit All (Signed Off)",
"command.commitAllAmend": "Commit All (Amend)",
"command.restoreCommitTemplate": "Restore Commit Template",
"command.undoCommit": "Undo Last Commit",
"command.checkout": "Checkout to...",
"command.branch": "Create Branch...",
Expand Down
5 changes: 5 additions & 0 deletions extensions/git/src/commands.ts
Expand Up @@ -1238,6 +1238,11 @@ export class CommandCenter {
await this.commitWithAnyInput(repository, { empty: true });
}

@command('git.restoreCommitTemplate', { repository: true })
async restoreCommitTemplate(repository: Repository): Promise<void> {
repository.inputBox.value = await repository.getCommitTemplate();
}

@command('git.undoCommit', { repository: true })
async undoCommit(repository: Repository): Promise<void> {
const HEAD = repository.HEAD;
Expand Down

0 comments on commit 31419e2

Please sign in to comment.