MU6ZNUYZBFX4HUTJO7HEXCEJ5KTQAMCR4MUKSUDM2MYUFCEAHRDAC
JYMSJCPQJYHP2OQLGDM2SBN4I7HO2ORFNRY3GB5QQIPYFSJE7JOQC
B4SKYP3Y5R7UPPGLLZV7OK3SIN4TRAJ3IL6FS3T7ZFZF5HTEQARQC
H3GAPFUC4TCMSLC3O4LUNQNHRANRNVIOQJRTZT4XQ3AUXFHTW4CAC
YUVLBWV3UDNQG63DMTQQOBBL4WMK2J7ODPIZ5337X5PDBZYFQO6AC
ZGMIJNFVDK7R6AF56FNCA23W5KV3HVBUBPTWMLQADCEPB3MOPELQC
ILH3GIVTVMKSU5TH5ZZSPB3URX622JA2BNBOO6K7ZTF4ISYDTJLAC
NCBEWRYEEJMJO37SHY7XCNFZYWLT5HUHCKN47UGSEY3FFWFX6QFQC
// TODO: Set input box placeholder
// Set the input box placeholder to match the hotkey
if (process.platform === 'darwin') {
this.sourceControl.inputBox.placeholder = 'Message (press Cmd+Enter to record a change)';
} else {
this.sourceControl.inputBox.placeholder = 'Message (press Ctrl+Enter to record a change)';
}
async recordAllChanges (message: string): Promise<void> {
await this.repository.recordAllChanges(message);
async recordAllChanges (message? : string): Promise<void> {
if (!message) {
message = this.sourceControl.inputBox.value;
// Clear message
this.sourceControl.inputBox.value = '';
if (!message) {
message = await window.showInputBox({
placeHolder: 'Change Message',
prompt: 'Please include a message describing what has changed',
ignoreFocusOut: true
});
}
}
if (message) {
await this.repository.recordAllChanges(message);
} else {
window.showErrorMessage('Change was not recorded, no message was provided');
}
// TODO: Get message from input box
const message = await window.showInputBox({
placeHolder: 'Change Message',
prompt: 'Please include a message describing what has changed',
ignoreFocusOut: true
});
if (message) {
repository.recordAllChanges(message);
} else {
window.showErrorMessage('Change was not recorded, no message was provided');
}
await repository.recordAllChanges();
await repository.refreshStatus();
}
/**
* Resets the repository, discarding unrecorded changes
* @param repository The repository that will be reset
*/
@command('pijul.resetAll', { repository: true })
async resetAll (repository: Repository): Promise<void> {
await repository.resetAll();