mirror of
https://github.com/Microsoft/vscode
synced 2024-08-24 11:36:01 +00:00
Git - include unstaged changes when amending a commit and smart commit is enabled (#219675)
This commit is contained in:
parent
c395df82fb
commit
3c7cbd264e
|
@ -2104,7 +2104,7 @@ export class CommandCenter {
|
|||
}
|
||||
|
||||
// no changes, and the user has not configured to commit all in this case
|
||||
if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit && !opts.all) {
|
||||
if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit && !opts.all && !opts.amend) {
|
||||
const suggestSmartCommit = config.get<boolean>('suggestSmartCommit') === true;
|
||||
|
||||
if (!suggestSmartCommit) {
|
||||
|
@ -2128,10 +2128,9 @@ export class CommandCenter {
|
|||
}
|
||||
}
|
||||
|
||||
if (opts.all === undefined) {
|
||||
// smart commit
|
||||
if (enableSmartCommit && !opts.all) {
|
||||
opts = { ...opts, all: noStagedChanges };
|
||||
} else if (!opts.all && noStagedChanges) {
|
||||
opts = { ...opts, all: true };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue