constanswer=awaitwindow.showWarningMessage(localize('are you sure',"This will create a Git repository in '{0}'. Are you sure you want to continue?",uri.fsPath),yes);
?localize('confirm stage files with merge conflicts',"Are you sure you want to stage {0} files with merge conflicts?",unresolved.length)
:localize('confirm stage file with merge conflicts',"Are you sure you want to stage {0} with merge conflicts?",path.basename(unresolved[0].resourceUri.fsPath));
constresult=awaitwindow.showInformationMessage(localize('deleted by them',"File '{0}' was deleted by them and modified by us.\n\nWhat would you like to do?",path.basename(uri.fsPath)),{modal: true},keepIt,deleteIt);
if(result===keepIt){
awaitrepository.add([uri]);
}elseif(result===deleteIt){
awaitrepository.rm([uri]);
}else{
thrownewError('Cancelled');
}
}elseif(resource.type===Status.DELETED_BY_US){
constkeepIt=localize('keep theirs',"Keep Their Version");
constdeleteIt=localize('delete',"Delete File");
constresult=awaitwindow.showInformationMessage(localize('deleted by us',"File '{0}' was deleted by us and modified by them.\n\nWhat would you like to do?",path.basename(uri.fsPath)),{modal: true},keepIt,deleteIt);
?localize('confirm stage files with merge conflicts',"Are you sure you want to stage {0} files with merge conflicts?",merge.length)
:localize('confirm stage file with merge conflicts',"Are you sure you want to stage {0} with merge conflicts?",path.basename(merge[0].resourceUri.fsPath));
message=localize('confirm delete',"Are you sure you want to DELETE {0}?\nThis is IRREVERSIBLE!\nThis file will be FOREVER LOST if you proceed.",path.basename(scmResources[0].resourceUri.fsPath));
yes=localize('delete file',"Delete file");
}else{
if(scmResources[0].type===Status.DELETED){
yes=localize('restore file',"Restore file");
message=localize('confirm restore',"Are you sure you want to restore {0}?",path.basename(scmResources[0].resourceUri.fsPath));
}else{
message=localize('confirm discard',"Are you sure you want to discard changes in {0}?",path.basename(scmResources[0].resourceUri.fsPath));
message=localize('confirm restore multiple',"Are you sure you want to restore {0} files?",scmResources.length);
}else{
message=localize('confirm discard multiple',"Are you sure you want to discard changes in {0} files?",scmResources.length);
}
if(untrackedCount>0){
message=`${message}\n\n${localize('warn untracked',"This will DELETE {0} untracked files!\nThis is IRREVERSIBLE!\nThese files will be FOREVER LOST.",untrackedCount)}`;
?localize('there are untracked files single',"The following untracked file will be DELETED FROM DISK if discarded: {0}.",path.basename(untrackedResources[0].resourceUri.fsPath))
:localize('there are untracked files',"There are {0} untracked files which will be DELETED FROM DISK if discarded.",untrackedResources.length);
constmessage=localize('confirm discard all 2',"{0}\n\nThis is IRREVERSIBLE, your current working set will be FOREVER LOST.",untrackedMessage,resources.length);
?localize('confirm discard all single',"Are you sure you want to discard changes in {0}?",path.basename(resources[0].resourceUri.fsPath))
:localize('confirm discard all',"Are you sure you want to discard ALL changes in {0} files?\nThis is IRREVERSIBLE!\nYour current working set will be FOREVER LOST if you proceed.",resources.length);
constyes=resources.length===1
?localize('discardAll multiple',"Discard 1 File")
:localize('discardAll',"Discard All {0} Files",resources.length);
constmessage=localize('confirm delete',"Are you sure you want to DELETE {0}?\nThis is IRREVERSIBLE!\nThis file will be FOREVER LOST if you proceed.",path.basename(resource.resourceUri.fsPath));
constmessage=localize('confirm delete multiple',"Are you sure you want to DELETE {0} files?\nThis is IRREVERSIBLE!\nThese files will be FOREVER LOST if you proceed.",resources.length);
?localize('unsaved files single',"The following file has unsaved changes which won't be included in the commit if you proceed: {0}.\n\nWould you like to save it before committing?",path.basename(documents[0].uri.fsPath))
:localize('unsaved files',"There are {0} unsaved files.\n\nWould you like to save them before committing?",documents.length);
constsaveAndCommit=localize('save and commit',"Save All & Commit");
// prompt the user if we want to commit all or not
constmessage=localize('no staged changes',"There are no staged changes to commit.\n\nWould you like to stage all your changes and commit them directly?");
awaitwindow.showErrorMessage(localize('no verify commit not allowed',"Commits without verification are not allowed, please enable them with the 'git.allowNoVerifyCommit' setting."));
returnfalse;
}
if(config.get<boolean>('confirmNoVerifyCommit')){
constmessage=localize('confirm no verify commit',"You are about to commit your changes without verification, this skips pre-commit hooks and can be undesirable.\n\nAre you sure to continue?");
constresult=awaitwindow.showWarningMessage(localize('merge commit',"The last commit was a merge commit. Are you sure you want to undo it?"),{modal: true},yes);
constchoice=awaitwindow.showWarningMessage(localize('local changes',"Your local changes would be overwritten by checkout."),{modal: true},force,stash);
constmessage=localize('confirm force push',"You are about to force push your changes, this can be destructive and could inadvertently overwrite changes made by others.\n\nAre you sure to continue?");
constmessage=localize('sync is unpredictable',"This action will push and pull commits to and from '{0}/{1}'.",HEAD.upstream.remote,HEAD.upstream.name);
constyes=localize('ok',"OK");
constneverAgain=localize('never again',"OK, Don't Show Again");
?localize('unsaved stash files single',"The following file has unsaved changes which won't be included in the stash if you proceed: {0}.\n\nWould you like to save it before stashing?",path.basename(documents[0].uri.fsPath))
:localize('unsaved stash files',"There are {0} unsaved files.\n\nWould you like to save them before stashing?",documents.length);
constsaveAndStash=localize('save and stash',"Save All & Stash");