Caleb Owens
4cae28668b
Merge branch 'master' into revert-3830-core-util-duration-updates
2024-05-24 14:20:55 +02:00
Caleb Owens
42a7c8bce4
Update Oplog State to better use SystemTime
2024-05-24 12:09:15 +02:00
Kiril Videlov
2ecee6df21
Merge pull request #3846 from gitbutlerapp/sc-fix-rebase-issue
...
Return the merge result in the case the rebase bails
2024-05-24 11:02:33 +02:00
Caleb Owens
5d723f1d91
Update comment to accuratly reflect data stored
2024-05-24 10:46:47 +02:00
Scott Chacon
c58719b77d
oops.
2024-05-24 10:45:54 +02:00
Kiril Videlov
9db262936c
Merge pull request #3845 from gitbutlerapp/update-base-branch-anyhow
...
feat: Update base branch handling to use anyhow
2024-05-24 10:44:54 +02:00
Caleb Owens
b8a1dcb2f0
Revert "Replace integer timestamps with Duration"
2024-05-24 09:40:52 +01:00
Scott Chacon
757a4690ca
return the merge result in the case the rebase bails
2024-05-24 10:38:48 +02:00
Kiril Videlov
d5ff348a21
feat: Update base branch handling to use anyhow
2024-05-24 10:31:43 +02:00
Kiril Videlov
3749bcef51
snapshot before comitting is done in two steps now
...
this way we have the commit id
2024-05-24 00:35:31 +02:00
Kiril Videlov
d25cd4535e
prepare a snapshot before restoring from a snapshot instead of after
2024-05-24 00:23:34 +02:00
Kiril Videlov
3fef7b5474
support creating snapshots in 2 steps - prepare and commit
...
This allows us to create a snapshot (write the full trees state) first, perform some operations, i.e. the action taken by the user, and then finally commit the oplog.
In some cases we wanna skip comitting the oplog entry if the action done by the user fails. In some cases we might wanna save the error value as snapshot metadata.
2024-05-24 00:16:40 +02:00
Kiril Videlov
879005ae20
check lines since snapshot for all dirty branches
...
This is needed because new changes to a file may be locked to a branch which is not the "default" one
2024-05-23 22:37:10 +02:00
Kiril Videlov
db4bb914cc
improve auto snapshotting check performance
2024-05-23 22:17:46 +02:00
Kiril Videlov
c2a5014ed0
oplog state persists timestamp of last snapshot
2024-05-23 22:17:46 +02:00
Mattias Granlund
3096a23098
run cargo fmt
2024-05-23 15:59:43 +02:00
Scott Chacon
6ccb52bd63
whoops
2024-05-23 15:59:43 +02:00
Scott Chacon
7d6c36f4de
refactor: Replace manual rebase with cherry-rebase function.
2024-05-23 15:59:43 +02:00
Caleb Owens
c2a1f6a7e7
Fix various tests
2024-05-23 14:26:16 +02:00
Caleb Owens
d6cde8d722
Update comment to no longer say seconds
2024-05-23 14:09:27 +02:00
Caleb Owens
b81151c77d
Rename serializer
2024-05-23 14:09:20 +02:00
Caleb Owens
4a7e5f48dd
Merge origin/master into core-util-duration-updates
2024-05-23 14:04:54 +02:00
Caleb Owens
d55260c96a
Use Duration rather than various integer times for time
2024-05-23 14:02:48 +02:00
Kiril Videlov
c7aaa1a6b6
fix oplog test
2024-05-23 13:40:53 +02:00
Kiril Videlov
1312813051
move snapshot MoveCommit before the operation
2024-05-23 11:59:26 +02:00
Kiril Videlov
55da2e550e
move snapshot UpdateCommitMessage before the operation
2024-05-23 11:58:13 +02:00
Kiril Videlov
7ab0bbb989
move snapshot SquashCommit before the operation
2024-05-23 11:57:34 +02:00
Kiril Videlov
72cdec8c93
move snapshot CherryPick before the operation
2024-05-23 11:56:52 +02:00
Kiril Videlov
e0584534e5
move snapshot UndoCommit before the operation
2024-05-23 11:54:46 +02:00
Kiril Videlov
05039a2bbb
move snapshot ReorderCommit before the operation
2024-05-23 11:54:03 +02:00
Kiril Videlov
ff04bc0a59
move snapshot InsertBlankCommit before the operation
2024-05-23 11:53:16 +02:00
Kiril Videlov
168a218ebe
move snapshot MoveCommitFile before the operation
2024-05-23 11:52:27 +02:00
Kiril Videlov
f514ec752c
move snapshot AmendCommit before the operation
2024-05-23 11:51:18 +02:00
Kiril Videlov
7944fb4558
move snapshot DiscardFile before the operation
2024-05-23 11:50:34 +02:00
Kiril Videlov
6574a805a8
move snapshot DiscardHunk before the operation
2024-05-23 11:50:06 +02:00
Kiril Videlov
a418f22e23
move snapshot UpdateWorkspaceBase before the operation
2024-05-23 11:49:34 +02:00
Kiril Videlov
f94ff8fd41
move snapshot MergeUpstream to before the operation
2024-05-23 11:48:56 +02:00
Kiril Videlov
a65aec6054
move snapshot SetBaseBranch to before the operation
2024-05-23 11:48:00 +02:00
Kiril Videlov
4092464be4
move snapshot UndoCommit to before the operation
2024-05-23 11:46:52 +02:00
Kiril Videlov
77e01b5928
move snapshot CreateCommit to before the operation
2024-05-23 11:45:14 +02:00
Kiril Videlov
89fb842701
move snapshot UpdateBranch to before the operation
2024-05-23 11:39:23 +02:00
Kiril Videlov
753cc02a37
move snapshot UnapplyBranch to before the operation
2024-05-23 11:27:24 +02:00
Kiril Videlov
ea5f8e8dad
move snapshot CreateBranch to before the operation
2024-05-23 11:23:37 +02:00
Kiril Videlov
7bd3548030
move snapshot DeleteBranch to before the operation
2024-05-23 11:12:33 +02:00
Kiril Videlov
4e234d6b5c
move snapshot ApplyBranch before the operation
2024-05-23 11:07:30 +02:00
Mattias Granlund
2b33b79d48
Fix lint
2024-05-23 10:58:59 +02:00
Mattias Granlund
021180d8f1
Rename function
2024-05-23 10:58:59 +02:00
Mattias Granlund
af4833f091
Fix a few bugs
2024-05-23 10:58:59 +02:00
Mattias Granlund
cd419eca67
Refactor how we merge in commits from branch upstream
...
- send change_id to frontend for `RemoteCommit`
- split up massive function into three
- add a couple of checks to prevent unexpected state
- rebase if force push allowed (needs toggle)
2024-05-23 10:58:59 +02:00
Mattias Granlund
ed14ddf378
Simplify function with ? shorthand
2024-05-23 10:58:59 +02:00