Adds test case for PR #1142

This commit is contained in:
Peter Cottle 2024-04-28 09:11:40 -07:00
parent 2749d9c59d
commit 6cbd02ec01

View file

@ -89,6 +89,13 @@ describe('Git Remotes', function() {
);
});
it('can fetch with --force where otherwise it would error', function() {
return expectTreeAsync(
'git clone; git fakeTeamwork; git commit; git checkout C1; git fetch origin main:main --force;',
'{"branches":{"main":{"target":"C2","id":"main","remoteTrackingBranchID":"o/main"},"o/main":{"target":"C2","id":"o/main","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C3":{"parents":["C1"],"id":"C3"},"C2":{"parents":["C1"],"id":"C2"}},"tags":{},"HEAD":{"target":"C1","id":"HEAD"},"originTree":{"branches":{"main":{"target":"C2","id":"main","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"}},"tags":{},"HEAD":{"target":"main","id":"HEAD"}}}',
);
});
it('checks all branches for fetching', function() {
return expectTreeAsync(
'git branch bugFix; git clone; git fakeTeamwork; git fetch',