GPTHUH3N7W2DMGEYDBKIAQFJS3CLNQEV667FQCRIH4ZNHFRODRLQC
VT237HUJI7DE5XLXAR4JARCOFOGC2WRGQWB3RJYAGGWNM36UDP3QC
64J6B76FTOAIPF2HGPIQYU523COLWHN7QOVC3XY42PHKC3GCLMZAC
6ONRFFRGQKTVXAV3URSA2QGMZYSEZBJ7BVMGVWW5M55MY57WFMQQC
B4SKYP3Y5R7UPPGLLZV7OK3SIN4TRAJ3IL6FS3T7ZFZF5HTEQARQC
BIEL6Z5JDBIC7ODKOW2FW65S2EW5U4ARAPWSD6FQLM2GKTEB6IBQC
YDCLFNEJZCXIHV6SS2XC7WPBPA5QTSLRMVVDLZ3XRJ7QDAISEGHQC
H3GAPFUC4TCMSLC3O4LUNQNHRANRNVIOQJRTZT4XQ3AUXFHTW4CAC
ZGMIJNFVDK7R6AF56FNCA23W5KV3HVBUBPTWMLQADCEPB3MOPELQC
GNQD74OZ56J2R23GVUGFP3G5KVML2KDZ4OUZK6SVLSM7HVO2WOCAC
ILH3GIVTVMKSU5TH5ZZSPB3URX622JA2BNBOO6K7ZTF4ISYDTJLAC
5ISTB4TW2BH52Y7U4XSVQ5PBHWIHIN2Q26V5M25HLWWHKJIPCNOQC
NCBEWRYEEJMJO37SHY7XCNFZYWLT5HUHCKN47UGSEY3FFWFX6QFQC
}
/**
* Unrecord a change
* @param change The change that will be unrecorded
* @param options The options for unrecording a change, indicating if the changes should be reset
*/
async unrecordChange (change: PijulChange, options: IUnrecordOptions = {}): Promise<void> {
// TODO: Warning message
await this.repository.unrecordChange(change, options);
}
/**
* Unrecord a change
* @param change The change that will be unrecorded
* @param options The options for unrecording a change, indicating if the changes should be reset
*/
async unrecordChange (change: PijulChange, options: IUnrecordOptions = {}): Promise<void> {
// TODO: Consider working around issues with the reset flag
const optionArray: string[] = options.reset ? ['--reset'] : [];
await this._pijul.exec(this.repositoryRoot, ['unrecord', change.hash, ...optionArray]);
/**
* Options for unrecording a change
*/
export interface IUnrecordOptions {
reset?: boolean
}
}
/**
* Unrecords a given change, without touching the working copy
* @param change The change to uynrecord
*/
@command('pijul.unrecordChange', { repository: true })
async unrecordChange (repository: Repository, change: PijulChange): Promise<void> {
if (await commandWarning(`Are you sure you want to unrecord change ${change.hash.substr(0, 10)}... ? The changes will remain in your working directory.`)) {
await repository.unrecordChange(change);
await repository.refreshStatus();
}
}
/**
* Unrecords a given change, resetting its changes from the working copy
* @param change The change top unrecord
*/
@command('pijul.unrecordChangeReset', { repository: true })
async unrecordChangeReset (repository: Repository, change: PijulChange): Promise<void> {
if (await commandWarning(`Are you sure you want to unrecord change ${change.hash.substr(0, 10)}... and reset your working directory? This may be a destructive action.`)) {
await repository.unrecordChange(change, { reset: true });
await repository.refreshStatus();
}
"when": "view == pijul.views.log && viewItem == pijulChange"
"when": "view == pijul.views.log && viewItem == pijulChange",
"group": "changeFirst"
},
{
"command": "pijul.unrecordChange",
"when": "view == pijul.views.log && viewItem == pijulChange",
"group": "changeSecond"
},
{
"command": "pijul.unrecordChangeReset",
"when": "view == pijul.views.log && viewItem == pijulChange",
"group": "changeSecond"