Release ForgeFlow 0.8.1
Add advanced Git and deployment workflows, secure backups and auditing, live Gitea integration, desktop notifications, connection validation, and the premium responsive UX refresh.
This commit is contained in:
1 parent
971896a1d5
commit
4ad698c4eb
47 files changed
+9114
-1648
No files matched your search
@@ -243,3 +243,30 @@ test('repairs a diverged branch by creating a safety branch before resetting to
|
||||
const backupSha = (await git(['rev-parse', repaired.backupBranch], working)).stdout.trim();
|
||||
assert.equal(backupSha, localBefore);
|
||||
});
|
||||
|
||||
test('troubleshooter detects and aborts an interrupted merge without discarding committed history', async (t) => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'forgeflow-interrupted-merge-'));
|
||||
t.after(() => fs.rm(root, { recursive: true, force: true }));
|
||||
await git(['init'], root);
|
||||
await git(['config', 'user.name', 'ForgeFlow Test'], root);
|
||||
await git(['config', 'user.email', 'forgeflow@example.invalid'], root);
|
||||
await fs.writeFile(path.join(root, 'file.txt'), 'base\n');
|
||||
await git(['add', '.'], root);
|
||||
await git(['commit', '-m', 'Base'], root);
|
||||
await git(['checkout', '-b', 'other'], root);
|
||||
await fs.writeFile(path.join(root, 'file.txt'), 'other\n');
|
||||
await git(['commit', '-am', 'Other'], root);
|
||||
await git(['checkout', 'master'], root);
|
||||
await fs.writeFile(path.join(root, 'file.txt'), 'main\n');
|
||||
await git(['commit', '-am', 'Main'], root);
|
||||
await assert.rejects(git(['merge', 'other'], root));
|
||||
|
||||
const service = new GitService();
|
||||
assert.equal(await service.detectInterruptedOperation(root), 'merge');
|
||||
const result = await service.abortInterruptedOperation(root);
|
||||
assert.equal(result.aborted, 'merge');
|
||||
assert.equal(await service.detectInterruptedOperation(root), null);
|
||||
assert.equal(result.status.clean, true);
|
||||
const subject = await git(['log', '-1', '--pretty=%s'], root);
|
||||
assert.equal(subject.stdout.trim(), 'Main');
|
||||
});
|
||||
Reference in new issue
Block a user