mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
feat: add setting for default stash message
This commit is contained in:
@@ -2506,12 +2506,14 @@ export class CommandCenter {
|
||||
}
|
||||
}
|
||||
|
||||
let defaultStashMessage: string;
|
||||
const commitTemplate = repository.sourceControl.commitTemplate;
|
||||
if (commitTemplate === undefined) {
|
||||
defaultStashMessage = repository.inputBox.value;
|
||||
} else {
|
||||
defaultStashMessage = repository.inputBox.value.replace(commitTemplate, '');
|
||||
let defaultStashMessage = '';
|
||||
if (config.get<boolean>('defaultStashMessage')) {
|
||||
const commitTemplate = repository.sourceControl.commitTemplate;
|
||||
if (commitTemplate === undefined) {
|
||||
defaultStashMessage = repository.inputBox.value;
|
||||
} else {
|
||||
defaultStashMessage = repository.inputBox.value.replace(commitTemplate, '');
|
||||
}
|
||||
}
|
||||
const message = await this.getStashMessage(defaultStashMessage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user