Kiril Videlov
6101c5c66f
move hunk and diff code to a separate crate, out of the branch one
2024-07-17 20:16:48 +02:00
Kiril Videlov
d5fffbd4ac
move HunkLock struct to branch actions crate
2024-07-17 18:30:23 +02:00
Kiril Videlov
5d74440d4c
remove lock attribute from diff hunk structs
2024-07-17 18:23:49 +02:00
Sebastian Thiel
3e79238e7f
assure conflicts::mark()
writes its file atomically
...
That way it can't be observed half-written, or remain in a half-written
state in case of crash.
2024-07-15 08:20:06 +02:00
Sebastian Thiel
4a7b63a56e
various refactors in main functions called during project load
...
* use `ctx` as name instead of `project_repository` to make lines shorter
and more readable. This could be done everywhere once the type-name changes
as well.
* Where possible, avoid using `&self` for `VirtualBranchActions` as there is no state.
For now I avoided to remove its usage as field in the filesystem monitor.
* Use a more modern way to use state in `tauri` commands.
* Add the `Ext` suffix to what clearly is extension traits.
2024-07-14 21:32:55 +02:00
Sebastian Thiel
85b4e564cd
simplify module paths of gitbutler-branch
crate
2024-07-14 21:32:55 +02:00
Sebastian Thiel
4501b5dd51
minimize the public API of the branch
crate
...
Only keep public what needs to be public right now, which always
helps with refactoring later.
2024-07-14 21:32:55 +02:00
Kiril Videlov
87f956d871
move ReferenceName tagged string to gitbutler-reference crate
...
gitbutler-reference is where ReferenceName belongs. There are other thing in this crate that are not nice, but let's clean those up!
2024-07-10 16:48:59 +02:00
Kiril Videlov
e92fe44fa1
move branch state into the gitbutler-branch crate
...
Further to the move - the VirtualBranchesExt trait creates a dependency towards gitbutler-project. The gitubler-branch crate doesn't have such dependency so i deemed it undesirable to introduce it just for a convinience method.
(Separately added an extention in gitbutler-virtual-actions since it already depends on project and to create a smaller diff)
2024-07-10 16:18:34 +02:00
Caleb Owens
9f13291edb
Fix migration code
2024-07-09 22:21:05 +02:00
Caleb Owens
9b59764db3
Split branch creation and deletion into their own home
2024-07-09 16:47:24 +02:00
Kiril Videlov
cdec47154d
remove references to gitbutler-core
2024-07-09 15:56:57 +02:00
Kiril Videlov
00354771b7
move ReferenceName type to the reference crate
2024-07-09 14:53:36 +02:00
Kiril Videlov
e4ab6262c9
move branch_ext to branch crate
2024-07-09 14:50:59 +02:00
Kiril Videlov
55b8a0357b
move id module to its own crate
2024-07-09 12:39:18 +02:00
Caleb Owens
3142a0c298
Use rename
2024-07-09 12:50:48 +02:00
Kiril Videlov
944b63c647
move serde functions into their own crate
2024-07-09 11:49:12 +02:00
Kiril Videlov
de200c8e20
move reference module from core to its own crate
2024-07-09 01:14:28 +02:00
Kiril Videlov
0b1ecf7b54
move virtual branch constatns out of the core create
2024-07-09 00:45:10 +02:00
Kiril Videlov
17b8214c5d
move target module to gitbutler-branch crate
2024-07-09 00:40:10 +02:00
Kiril Videlov
acee9ba5ab
move branch related modules to separate crate
...
Unfortunatelly diff and branch types form a cyclical dependency via the "HunkLock" type. This will have to be refactored as a followup
2024-07-09 00:10:55 +02:00
Kiril Videlov
0c9c781bd5
Renaming crate gitbutler-branch to gitbutler-virtual
...
This is more descriptive to what logic lives inside. Further, this allows for splitting up the just branch bits in a separate crate (which is currently in gitbutler-core)
2024-07-08 20:56:00 +02:00
Kiril Videlov
f965a3e4cf
move author module to the branch crate - the only place this is used
2024-07-08 19:35:49 +02:00
Kiril Videlov
83a1d4a1e5
extract user as its own crate out of core
2024-07-08 18:58:29 +02:00
Kiril Videlov
f042854b1c
combine the assets proxying implementaiton in one file
...
Now it's only used in one place
2024-07-08 18:23:51 +02:00
Kiril Videlov
ba5b9ff0ee
Merge branch 'master' into extract-project-from-core-into-its-onw-crate
2024-07-08 17:57:17 +02:00
Caleb Owens
bf9cc91d3e
No longer using commit headers other than change_id
2024-07-08 17:09:01 +02:00
Kiril Videlov
e93896621f
move project module in a separate gitbutler-project crate
2024-07-08 15:33:26 +02:00
Caleb Owens
2e8065128e
Recover old virtual branches state
2024-07-08 15:00:10 +02:00
Caleb Owens
f1ad8e6ca3
Handle the old_applied type
2024-07-08 15:00:03 +02:00
Caleb Owens
066d6d2437
Rename 'list_branches' to convey more meaning
2024-07-08 14:58:31 +02:00
Caleb Owens
54744ef78c
Remove more remnents of unapplied branches
2024-07-08 14:58:28 +02:00
Kiril Videlov
e258710502
move ProjectRepo into its own crate
...
This type currently acts more or less like a command context that lives for the duration of the request. Regardless of if we wanna keep this pattern or not, separating it out helps us split up core
2024-07-08 13:23:03 +02:00
Kiril Videlov
306ab0bea9
move legacy credentail helper to gitbutler-repo crate
...
it's mostly used from there
2024-07-08 13:01:38 +02:00
Kiril Videlov
7ac2d3a619
move repository ext trait to gitbutler-repo crate
2024-07-08 12:21:01 +02:00
Kiril Videlov
f92df0cde7
move RepoActions to gitbutler-repo crate
2024-07-08 00:45:04 +02:00
Kiril Videlov
ce497ef7cd
move rebase module to a new repo crate
2024-07-08 00:27:17 +02:00
Kiril Videlov
f7ea32730f
remove unnecessary metho drom RepoActions
2024-07-07 23:37:15 +02:00
Kiril Videlov
018e550560
move remote_branches function from RepoActions to RepositoryExt
2024-07-07 23:33:58 +02:00
Kiril Videlov
66e8e8b91b
remove useless indirection when getting repo head
2024-07-07 23:24:45 +02:00
Kiril Videlov
50577f3865
remove inappropriate path function from repo actions trait
2024-07-07 23:12:43 +02:00
Kiril Videlov
6dcbb8bddb
move conflicts module to branches crate
2024-07-07 22:58:48 +02:00
Kiril Videlov
ca2ffaac68
separate complex actions on Project repo in a separate trait
2024-07-07 22:28:27 +02:00
Kiril Videlov
143b3252a7
rename Repository type to ProjectRepo
...
Less misleading this way..
2024-07-07 22:09:45 +02:00
Kiril Videlov
00a77d9327
move branch state into a separate crate
2024-07-07 21:26:07 +02:00
Kiril Videlov
71809fc882
remove project dependency on oplog
2024-07-07 21:10:31 +02:00
Kiril Videlov
a7aa9b0e10
move remote module to the branch crate
2024-07-07 20:48:12 +02:00
Kiril Videlov
3d0455f12b
move virtual branch files impl our of core
2024-07-07 20:35:26 +02:00
Kiril Videlov
c36f67f148
move oplog to its own crate
...
This protects us from cyclic dependencies. Unfortunatelly as part of this, i had to introduce the imp Project as trait implementations since now Project is foreign
2024-07-07 20:00:01 +02:00
Kiril Videlov
9dc82e8fe9
move virtual, integration and base modules to gitbutler-branch crate
2024-07-07 17:30:18 +02:00