mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Put current git branch name as value when renaming (#72957)
* Put current git branch name as value when renaming * Simplify code
This commit is contained in:
@@ -1572,8 +1572,11 @@ export class CommandCenter {
|
||||
|
||||
@command('git.renameBranch', { repository: true })
|
||||
async renameBranch(repository: Repository): Promise<void> {
|
||||
const placeHolder = localize('provide branch name', "Please provide a branch name");
|
||||
const name = await window.showInputBox({ placeHolder });
|
||||
const name = await window.showInputBox({
|
||||
placeHolder: localize('branch name', "Branch name"),
|
||||
prompt: localize('provide branch name', "Please provide a branch name"),
|
||||
value: repository.HEAD && repository.HEAD.name
|
||||
});
|
||||
|
||||
if (!name || name.trim().length === 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user