Sebastian Thiel
822fd92b9d
Enforce locking by making locks part of the public oplog
API.
...
This way, all methods that care about the `oplog` also have to
care about choosing the right lock.
2024-07-15 21:09:33 +02:00
Mattias Granlund
6692acd261
Simplify SystemEditor readable
2024-07-15 14:34:55 +01:00
Sebastian Thiel
09ca2d0284
enforce in-process-synchronization during worktree updates and prolonged reads in oplog
...
That way it's assured that reads and writes don't intersect, but assure we only
hold such lock for the shortest amount of time for reads and and for the
full duration of writes.
2024-07-15 14:21:15 +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
b3b87b34a5
reduce tauri
state
...
This is in preparation for making operations that access the filesystems
less stateful, which in turn makes it less akward to identify writing
methods with `&mut` lateron.
This includes accepting that all we really need is a single directory
to generate everything else we need on the fly. This simplifies commands.
For good measure, this also simplifies imports of smaller crates that are
involved.
2024-07-14 22:27:53 +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
f48d0e2746
adapt to changes in gitbutler-branch
crate
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
Sebastian Thiel
4805f6e7e7
adapt to changes in gitbutler-branch-actions
2024-07-14 21:32:55 +02:00
Sebastian Thiel
5e408f6b2d
Assure a single path to an item (struct, fn)
...
Also, simplify paths and optimize them (to some extend) to seem
non-redundant when `use`ing them.
2024-07-14 21:32:55 +02:00
Sebastian Thiel
0079f2bcbe
minimize the public API of gitbutler-branch-actions
crate.
...
Also avoid private traits where functions would be easier to use.
2024-07-14 21:32:54 +02:00
Sebastian Thiel
6fb6201ab9
assure docs can be built without warnings by default.
...
It's a good way to review import paths and the public API.
2024-07-14 21:32:49 +02:00
Sebastian Thiel
eaa18da9d0
Make the ProjectSelector
multi-window aware
...
That way it will not allow to open a project if it's known to be open already.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
38f800d877
assure the multi-window lock actually works
...
This includes the UI is responding to issues.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
24b8bdaa86
Open new existing projects with Alt + click
in project popup.
...
This is intentionally non-obvious for now while it's new.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
c310942b12
keep track of state per window
...
This allows multiple application windows to be opened and managed.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
ccd6a6fe0d
let UI trigger necessary updates on addition and removal
2024-07-12 15:19:09 +02:00
Sebastian Thiel
00303704f4
add project-lock to generalized state
...
This means the current watcher also includes a file-lock for the current project.
Later this can be generalized to be per-window.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
4d2a153aed
Use extractors for project-commands
...
That way, it's clearer what facilities or global state
are used when invoking a particular command.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
c51be90aea
Merge pull request #4338 from gitbutlerapp/Fix-double-remote-fetch
...
Fix double remote fetch
2024-07-12 10:37:34 +02:00
Sebastian Thiel
5f4e0adb28
remove now unused default_target()
function
2024-07-12 10:30:56 +02:00
Mattias Granlund
58d3cd5aff
Fix double fetching of remote
...
- all remotes already fetched in existing iter/map
2024-07-12 00:38:46 +01:00
Mattias Granlund
f832e0b83a
Fix double loading of things on open
...
- fetch event is already in use by front end for reloading
2024-07-12 01:30:04 +03:00
Caleb Owens
c982e78567
Merge pull request #4328 from gitbutlerapp/split-branch-manager-into-seprate-traits
...
Use impls rather than private traits
2024-07-10 17:50:35 +02:00
Caleb Owens
38d54e3eaf
Use impls rather than private traits
2024-07-10 17:42:05 +02:00
Caleb Owens
b732bdf622
Merge pull request #4326 from gitbutlerapp/split-branch-manager-into-seprate-traits
...
Split branch manager into seperate traits
2024-07-10 17:33:04 +02:00
Caleb Owens
482a176333
Added some high level docs
2024-07-10 17:25:48 +02:00
Caleb Owens
ca4cdfe968
Split branch manager into seperate traits
2024-07-10 17:23:50 +02:00
Kiril Videlov
d9d20d20e9
fixes a regression created during refactoring
2024-07-10 17:23:07 +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
d010d56044
Merge pull request #4324 from gitbutlerapp/move-branch-state-in-branch-crate
...
move branch state into the gitbutler-branch crate
2024-07-10 16:27:01 +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
Nico Domino
43f60f94c8
feat: extract svelte build into own GHA job ( #4321 )
2024-07-10 13:45:18 +00:00
Kiril Videlov
c8658b9a23
rename gitbutler-virtual to gitbutler-branch-actions
...
This is to establish a patter of which crates represent a higher level logic
2024-07-10 14:49:48 +02:00
Kiril Videlov
da67580c80
Rename VirtualBrancesAccess to _Ext since it's the convention
...
After discussing it, seems like a better way of naming this is to use the Ext convention
2024-07-10 12:54:22 +02:00
Kiril Videlov
ae6dc38ac7
rename virtual branches controller to actions
2024-07-10 12:11:36 +02:00
Kiril Videlov
a06570deb6
make the virtual branches controller stateless
2024-07-10 12:07:11 +02:00
Caleb Owens
b49b23c2c2
Update other logic TODO: dedup logic
2024-07-09 23:31:49 +02:00
Kiril Videlov
5a0072db53
Merge pull request #4313 from gitbutlerapp/fix-migration-cdoe
...
Fix migration code
2024-07-09 23:05:10 +02:00
Kiril Videlov
be55ae3dc6
fixes somethig??
2024-07-09 22:40:41 +02:00
Caleb Owens
7127bd9c01
Update filtered searches to use is_old_applied metric
2024-07-09 22:31:38 +02:00
Caleb Owens
9f13291edb
Fix migration code
2024-07-09 22:21:05 +02:00
Sebastian Thiel
0b735b58f3
avoid proxying author-images in favor to letting the frontend do the caching ( #4007 )
...
The frontend should be better at this due to being a browser engine, which can naturally
handle slow network links and firewalls.
Caching should also be better and more consistent as cache-related headers are respected.
This should speed up display times of new branches significantly, ideally without blocking
the UI at all.
2024-07-09 21:24:23 +02:00
Caleb Owens
c439334633
Remove old feature flag
2024-07-09 20:22:45 +02:00
Caleb Owens
44aa0ba5df
Remove old hunk locking algorythmimi
2024-07-09 20:18:37 +02:00
Caleb Owens
c4db79e789
Remove nolonger valid tests
2024-07-09 20:12: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
45d4d7c6e1
remove unused deps
2024-07-09 16:00:45 +02:00
Kiril Videlov
cdec47154d
remove references to gitbutler-core
2024-07-09 15:56:57 +02:00
Kiril Videlov
c95c977ce2
move windows module to tauri
...
Does this even do anything? Seems like dead code...
2024-07-09 15:44:58 +02:00
Kiril Videlov
ecc6848c07
remove duplicated files that were moved to another crate
2024-07-09 15:36:45 +02:00
Kiril Videlov
99d7b85343
move url module to a separate crate
...
this code is awful - lets nuke it asap
2024-07-09 15:29:24 +02:00
Kiril Videlov
01f3e0f0c4
extract tagged string to its own crate
2024-07-09 14:57:43 +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
5c85bddccc
remove dead code
2024-07-09 14:45:17 +02:00
Kiril Videlov
db9d29b467
Rename ProjectRepo to ProjectRepository
...
This is casue some ppl dont like abbrevs
2024-07-09 13:45:04 +02:00
Kiril Videlov
b856ebf6d3
Merge pull request #4302 from gitbutlerapp/extract-more-things-out-of-core
...
extract more things out of core
2024-07-09 13:33:27 +02:00
Kiril Videlov
164ca5ed85
Merge pull request #4255 from Byron/log-retention
...
better logs
2024-07-09 13:28:40 +02:00
Kiril Videlov
5932e328ed
remove dead code
2024-07-09 13:23:06 +02:00
Kiril Videlov
a4d3680891
extract commit crate out of core
2024-07-09 13:19:49 +02:00
Kiril Videlov
9023382c78
move time module to it's own crate
2024-07-09 13:08:12 +02:00
Kiril Videlov
bf373c5d8f
move default_true type to the only place where its relevant
...
We dont really want this type to spread through the codebase
2024-07-09 13:00:26 +02:00
Kiril Videlov
3be7d600e0
move fs and storage intor separate crates
2024-07-09 12:54:08 +02:00
Caleb Owens
3142a0c298
Use rename
2024-07-09 12:50:48 +02:00
Kiril Videlov
55b8a0357b
move id module to its own crate
2024-07-09 12:39:18 +02:00
Kiril Videlov
b0440ce989
move ssh module to the only place where it's relevant
2024-07-09 12:31:15 +02:00
Kiril Videlov
25ec331791
move secret module out of core into own crate
2024-07-09 12:11:12 +02:00
Kiril Videlov
944b63c647
move serde functions into their own crate
2024-07-09 11:49:12 +02:00
Kiril Videlov
a6a6ba3ae5
fix error doctests
2024-07-09 11:40:48 +02:00
Kiril Videlov
fb862f0907
move dedup to gitbutler-virtual
...
its the only place where this is relevant
2024-07-09 11:30:29 +02:00
Kiril Videlov
262757cf39
Merge pull request #4295 from gitbutlerapp/move-err-module-to-crate
...
move error module to it's own crate
2024-07-09 11:26:05 +02:00
Kiril Videlov
989f27a0d6
move error module to it's own crate
2024-07-09 11:13:39 +02:00
Sebastian Thiel
bb880cf8a6
specifically remove log files with old name
...
This also assures that previously spilled secrets will be removed.
2024-07-09 11:10:21 +02:00
Sebastian Thiel
5f192d0e77
consistent extension for .log
files should help in reading them.
...
This might particularly be true on Windows.
Note that we don't call them `txt` to make opening them with
a specialized program easier.
2024-07-09 11:03:31 +02:00
Sebastian Thiel
b1b04adf56
assure not too many log files are retained.
...
Previously, despite `max_log_files()` configured, it would still
retain more than that, and effectively never delete any as that
would only happen on log-rotation.
Now we do it ourselves just once.
2024-07-09 10:53:16 +02:00
Sebastian Thiel
7ffb13550a
remove unused lock
module and dependency to fslock
2024-07-09 10:24:27 +02:00
Kiril Videlov
9e69806d06
fix some cargo stuff
2024-07-09 01:17:37 +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
8043f0dd4e
remove unused keys module
2024-07-09 00:26:27 +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
41ec6da226
move askpass module to repository where it is being used
2024-07-08 19:45:35 +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
82431b182e
actually remove the code that was move out
2024-07-08 19:06:04 +02:00
Kiril Videlov
e1cf6b1884
remove some unused code
2024-07-08 19:03:50 +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
cdbf4d8cd3
move legacy config module out of core
2024-07-08 18:12:12 +02:00
Kiril Videlov
ba4359c7dc
fix an import oopsie
2024-07-08 17:58:56 +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
f7094fcdff
move config module to a separate gitbutler-config crate
2024-07-08 14:49:45 +02:00
Kiril Videlov
a049711472
separate sending zipped logs functionality into gitbutler-feedback crate
2024-07-08 13:52:22 +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
a83a9a8ffc
remove useless stateful remotes controller
...
The same stuff can be achievecd without hoarding state
2024-07-08 10:58:16 +02:00
Kiril Videlov
f9f8addb72
move repo related commands out of the project controller
2024-07-08 10:47:37 +02:00
Kiril Videlov
7c7143a570
create new module in tauri for repo related functions
...
moving out of project
2024-07-08 10:36:06 +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
e37f02030a
move repo syncing code to the sync crate
2024-07-08 00:09:39 +02:00
Kiril Videlov
83297de784
remove a leftover file that was moved to another crate
2024-07-07 23:49:14 +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
e75d99aca0
remove unused functions
2024-07-07 23:26:02 +02:00
Kiril Videlov
66e8e8b91b
remove useless indirection when getting repo head
2024-07-07 23:24:45 +02:00
Kiril Videlov
c62c43ed6c
remove useless indirection when getting index size
2024-07-07 23:22:58 +02:00
Kiril Videlov
569d282700
remove dependence of projects controller towards repo actions
2024-07-07 23:19:48 +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
0924b506d7
remove deps towards repository actions from remotes controller
2024-07-07 22:38:33 +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
e2bfb03fa9
remove irrelevant test
...
This test used to exercise the custom iterator that existed before
2024-07-07 21:27:09 +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
d456ba5e77
move cloud sync functionality to its own crate
2024-07-07 19:22:41 +02:00
Kiril Videlov
9dc82e8fe9
move virtual, integration and base modules to gitbutler-branch crate
2024-07-07 17:30:18 +02:00
Kiril Videlov
f224207029
move remaining integration constants to core
2024-07-07 16:49:25 +02:00
Kiril Videlov
0865521f90
move GITBUTLER_INTEGRATION_REFERENCE constant outside of integration rs
...
This allows integration implementation to be extracted out of core
2024-07-07 16:34:20 +02:00
Kiril Videlov
9eaab28a48
move base branch implementation to branches crate
2024-07-07 16:29:24 +02:00
Kiril Videlov
41f28383a0
move author to core
2024-07-07 16:13:06 +02:00
Kiril Videlov
7627a41c89
remove unused method on the assets proxy impl
2024-07-07 16:06:26 +02:00
Kiril Videlov
ce130dcf12
move normalize_branch_name to core
2024-07-07 16:04:01 +02:00
Kiril Videlov
948c89e8be
move virtual outside of core
2024-07-07 15:51:07 +02:00
Kiril Videlov
7d078de52f
start moving virtual_branches to separate crate
...
We want to move towards having each functional domain in a separate crate.
The main benefit of that for our project is that this will enforce a unidirectional dependency graph (i.e. no cycles).
Starting off with virutal_branches - a lot of the implementation is still in core (i.e. virtual.rs), that will be moved in a separate PR.
Furthermore, the virtual branches controller (as well as virtual.rs) contain functions not directly related to branches (e.g. commit reordering etc). That will be furthe separate in a crate.
2024-07-07 13:32:35 +02:00
Kiril Videlov
532b51bade
feature flag for disabling the project semaphore
...
It's possible that the sempahore state in the virtual branches controller is completely unnecessary. This feature flag allows us to test this hypothesis
2024-07-06 18:57:58 +02:00
Kiril Videlov
819b327973
virtual branches controller - remove state dependency to credentials controller
2024-07-06 17:03:46 +02:00
Kiril Videlov
c777431363
remove the gitbutler generated key flow
2024-07-05 15:56:24 +02:00
Kiril Videlov
3e01e86701
remove with_verify_branch middleware closures
2024-07-04 17:12:20 +02:00
Kiril Videlov
82dd580c27
move the updating of "last fetch timestamp" logic
...
Removing the updating of project from the virtual branch controller - this is the only dependency between the two controllers and likely indicates that the "last fetched at" should live somewhere else.
It will serve us well to not mutate the project state from the virtual branches domain
2024-07-04 16:34:53 +02:00
Kiril Videlov
dfd15dc821
remove unused function
2024-07-04 15:36:36 +02:00
Kiril Videlov
fe7f1167bf
virtua branches controller - rm deps on project controller
2024-07-04 15:26:10 +02:00
Kiril Videlov
babfa974ce
remove unnecessary lifetime annotations
2024-07-04 13:31:08 +02:00
Kiril Videlov
3dded08458
simplify virtual branches controller deps graph
...
users controller is not a real dependency
2024-07-04 13:28:17 +02:00
Kiril Videlov
6add0a40cc
remove unnecessary user dependency
2024-07-04 13:09:04 +02:00
Kiril Videlov
5e18071a30
refactor: virtual branch controller - rm inner pattern
2024-07-04 12:21:22 +02:00
Caleb Owens
2d0dc3a9ff
Better filter branches to unapply in case of conflicts
2024-07-03 14:57:18 +02:00
Caleb Owens
49236707be
Use correct headers for unapplying wip commits
2024-07-02 17:30:00 +02:00
Kiril Videlov
8e3601e855
Merge: resolve lockfile conflicts
2024-07-02 16:21:54 +02:00
Kiril Videlov
88da873128
Merge pull request #4184 from gitbutlerapp/bundle-as-RPM
...
make RPM bundles
2024-07-02 15:54:42 +02:00
Caleb Owens
ac4f3b926c
Merge remote-tracking branch 'origin/master' into ndom91/create-gitbutler-ui-package
2024-07-02 15:31:00 +02:00
Kiril Videlov
1ac47405fc
fix clippy warning about missing crossbeam feature
2024-07-02 15:14:40 +02:00
Kiril Videlov
6e8e6b7b9b
remote unneccesary borrow
2024-07-02 15:11:28 +02:00
Kiril Videlov
23503afd25
merge stuff
2024-07-02 15:05:56 +02:00
Sebastian Thiel
b8da62c68b
assure SecretServices functions
...
- inject secretService so it works when used directly
- remove console logs
- only remove a migrated secret (instead of removing it unconditionally)
- in +template, await for good measure, which explains why the parent function is async
In the backend:
- prevent concurrency in method that stores secrets from the frontend
as it's racy otherwise to type a secret quickly.
2024-07-02 13:17:45 +02:00
Caleb Owens
44e56ac370
Use turbo for production builds
2024-07-02 13:15:26 +02:00
Kiril Videlov
25aceb2520
rm unnecessary borrows
2024-07-02 11:22:08 +03:00
Kiril Videlov
a240a16cc5
silence clippy for now
2024-07-02 11:18:41 +03:00
Nico Domino
4fab3ec200
Merge branch 'master' into ndom91/create-gitbutler-ui-package
2024-07-02 10:04:46 +02:00
Sebastian Thiel
05506f49fa
migrate AI tokens from the git-configuration to the keystore.
...
All AI related options are stored in the user-level git configuration
file. Upon first access, they will be removed from there and placed
into the keystore as part of the migration.
The UI is provided with functions to store and save secrets which it
will use specifically to interact with these keys.
It's explicitly out of scope to *not* show the keys in plain-text
anymore after entering them.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
de00e4f049
support global secrets (without namespace for build types) and provide commands in tauri
crate
...
That way globals secrets can be used from the UI directly.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
b08a9e8cb1
Prevent MacOS popups each startup on MacOS
...
MacOS is the only known platform that exhibits this behaviour - if an app
is recompiled, the hash of the binary is used to identify it towards the keychain.
As this changes each time, the keychain will ask for permission, which is fair.
However, it's also an impediment which leads to the implementation of
a keystore that uses git credentials as backend. For this to work,
the latest version of `gitoxide` is required for now.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
7e7555567b
automatically delete empty passwords from the key store
...
The frontend uses this to invalidate the GitHub token, even though
it can also deal with `null`. Let's keep the keystore clean and
only keep entries that contain an actual password.
Note that the consumers, i.e. the frontend, handle an empty password
for the short time it's in memory.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
9da051b089
improve naming of tokens stored in the keychain: do not 'abuse' user field
...
Currently, the user is used as handle name, but instead, just name it
`GitButler`.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
fbfeba0637
auto-delete a user if its access token can't be found
2024-07-02 10:02:46 +02:00
Sebastian Thiel
ee5ff95649
Assure Sensitive
fields can't be serialized
...
This does not only mean that they cannot be written to disk, but also
that extra work has to be done to serialize them over the wire.
This is very much by design, as they can be in structs that are
seemingly serializable and contain sensitive data, but they must
never actually be serialized.
For use in the UI, an extra type must be used that marks the secret
differently, for instance by field name.
2024-07-02 10:02:45 +02:00
Sebastian Thiel
bc8f3b74c7
tauri
specializes the secret-store depending on application type
...
That way, there is no overlap in the technically global store, just
like before when secrets were stored in plain text.
2024-07-02 10:02:45 +02:00
Sebastian Thiel
929eb52224
auto-migrate secrets from user.json to their location in the keyring
...
This will also remove them from their plain-text location.
Further, when the secrets are required they will be obtained
specifically, instead of always having them at hand.
The frontend doesn't ever show these, but needs them, and
it now asks for them when it needs them.
2024-07-02 10:02:43 +02:00
Sebastian Thiel
f3e6c7ba94
Add the capability to store and retrieve secrets
...
This is a global facility without any state, and provides a simplified
interface to the `keyring` crate.
2024-07-02 10:01:44 +02:00
Sebastian Thiel
cedb893ad6
put 'core::serde' into its own module file
...
It started small, but now is large enough to warrant that.
2024-07-02 10:01:44 +02:00
Kiril Videlov
4db2698cda
bump tauri minor version
...
this allows us to bundle RPM packages!
2024-07-02 10:48:47 +03:00
Caleb Owens
82c3987d45
Unapply to real branches ( #4025 )
...
* Don't return optional
* Rename get_integration_commiter
* Add a header to wip commit
* Stuff
* Unapply all branches
* Reorder code
* Fix one test
* Name resolution
* Fix two tests
* Fix another!
* wip
* Fix so many tests
* Fix unapply.rs tests
* Fix selected for changes tests
* Move unapplying logic to delete_branch method
* Remove unused and kinda borked cherry_commit code
* Fix the tests!!!!!
* Make apply_branch private
* Change handling of headers
* Improve order integrity
* Updated types and comments to convey more meaning
2024-07-01 14:13:52 +00:00
ndom91
836b86a753
Merge branch 'master' into ndom91/create-gitbutler-ui-package
2024-06-28 12:50:44 +02:00
Kiril Videlov
b72f9c2199
move error marker out of virtual_branches mod
...
It's useful outside of it
2024-06-28 11:35:44 +02:00
ndom91
d8a7f2bbdc
fix: cleanup build npm scripts
2024-06-28 11:34:44 +02:00
Kiril Videlov
b623952fdd
Merge pull request #4198 from gitbutlerapp/remove-print-tree-function
...
refactor: Remove unused _print_tree function.
2024-06-28 11:21:26 +02:00
Kiril Videlov
8ed324580c
refactor: Remove unused _print_tree function.
2024-06-28 11:10:27 +02:00
Kiril Videlov
251d56677d
refactor: move rebase functions out of virtual_branches module
...
This opens the doors for further simplifying the core
2024-06-28 11:04:15 +02:00
Sebastian Thiel
adc50a7e7f
more robust login handling by deleting corrupt user.json file
...
If a user.json file cannot be loaded, delete it automatically
to avoid users to get stuck in 'something went wrong' during layout.
Older versions of GB wouldn't find the access-token in the user.json file
anymore, which would be completely removed via #4165
2024-06-27 15:10:48 +02:00
ndom91
091b45d5e9
feat: create separate component library subpackage
2024-06-26 18:01:09 +02:00
Kiril Videlov
b886ff84f1
refactor: Remove rusqlite dependency and related code.
2024-06-26 16:21:24 +02:00
Kiril Videlov
3fb7f3b8bb
add the ability to toggle the allow rebasing flag for lanes in the UI
2024-06-26 13:53:13 +02:00
Kiril Videlov
d17534d291
adds the ability to update the allow_rebasing flag on branches and fix tests
2024-06-26 10:23:31 +02:00
Kiril Videlov
d4267b81d5
use per-branch flag to check if rebasing is allowed
2024-06-25 21:36:43 +02:00
Kiril Videlov
4a0cf76b53
make RPM bundles
2024-06-25 20:44:11 +02:00
Kiril Videlov
03214dcaa1
introduce a new flag for branches determining if rebasing is allowed
2024-06-25 20:10:27 +02:00
Kiril Videlov
d4ab41cef9
remove unused code
2024-06-25 14:50:17 +02:00
Kiril Videlov
e707bdd812
Merge pull request #4174 from gitbutlerapp/cool-with-submodules
...
cool with submodules
2024-06-25 13:35:05 +02:00
Mattias Granlund
e499b8fdfd
Remove timestamp_ms
from Hunk
...
We are not using it, let's re-introduce if needed in the future.
2024-06-25 14:23:45 +03:00
Kiril Videlov
70dc0b54f3
remove a restriction on adding repos with submodules
2024-06-25 13:23:08 +02:00
Kiril Videlov
e4897c467a
ignore submodules on oplog list submodules
2024-06-25 13:21:51 +02:00
Mattias Granlund
0ae5ded3ec
Add test covering issue #4148
2024-06-25 13:09:21 +03:00
Mattias Granlund
e91634bcdb
Move a couple of test utils to test_project.rs
2024-06-25 13:09:21 +03:00
Mattias Granlund
d12698abb5
Fix bug in hunk -> branch assignment
...
- return early on lock only if hunk matches or intersects
2024-06-24 23:11:39 +03:00
dependabot[bot]
b0579da1db
Bump tauri from 1.6.7 to 1.6.8 in the cargo group across 1 directory
...
Bumps the cargo group with 1 update in the / directory: [tauri](https://github.com/tauri-apps/tauri ).
Updates `tauri` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/tauri-apps/tauri/releases )
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v1.6.7...tauri-v1.6.8 )
---
updated-dependencies:
- dependency-name: tauri
dependency-type: direct:production
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 14:30:04 +00:00
Kiril Videlov
8a24b7363a
Merge pull request #4115 from gitbutlerapp/dependabot/cargo/cargo-c9137a7768
...
Bump the cargo group with 2 updates
2024-06-24 16:27:59 +02:00
Kiril Videlov
b6c41e572f
Merge pull request #4162 from gitbutlerapp/better-exe-resolution
...
Use `gitoxide` to more reliably find the Git executable on Windows. (#1419 )
2024-06-24 16:26:07 +02:00
Sebastian Thiel
cd20bbb859
Use gitoxide
to more reliably find the Git executable on Windows. ( #1419 )
...
Previously, Windows installations that didn't put git.exe into their PATH
were unable to have their executable found.
`gitoxide` has the same problem to solve and can now 'find harder' in
known installation locations.
This capability is now used here, instead of hard-coding `git.exe` or `git`.
2024-06-24 16:03:15 +02:00
Kiril Videlov
4477cfcb1d
Merge pull request #3948 from Byron/watcher-refactor
...
watcher refactor
2024-06-24 15:47:12 +02:00
Lukylix
3a079593b2
Removed an unused import
2024-06-21 23:28:08 +02:00
Lukylix
5bc830baa0
Wide path convertion
2024-06-21 22:55:48 +02:00
Lukylix
e42026188d
Limiting pipe instances on windows
2024-06-21 22:50:02 +02:00
Lukylix
2d7b7737be
Askpass test
2024-06-21 22:49:19 +02:00
Lukylix
7b509c4dcd
Windows Pipe CloseHandle and Cloning
2024-06-20 16:43:25 +02:00
Lukylix
28668e1b2c
Fix askpass pipe on windows
2024-06-19 14:08:10 +02:00
dependabot[bot]
553674de3b
Bump the cargo group with 2 updates
...
Bumps the cargo group with 2 updates: [tauri](https://github.com/tauri-apps/tauri ) and [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek ).
Updates `tauri` from 1.6.2 to 1.6.7
- [Release notes](https://github.com/tauri-apps/tauri/releases )
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v1.6.2...tauri-v1.6.7 )
Updates `curve25519-dalek` from 4.1.2 to 4.1.3
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases )
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/curve25519-4.1.2...curve25519-4.1.3 )
---
updated-dependencies:
- dependency-name: tauri
dependency-type: direct:production
dependency-group: cargo
- dependency-name: curve25519-dalek
dependency-type: indirect
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 23:21:19 +00:00
Pavel Laptev
0dfb591ac4
Revert "Added hotkey and the accelerator to the top menu ( #4097 )" ( #4099 )
...
This reverts commit e09810bfff
.
2024-06-17 14:20:38 +02:00
Pavel Laptev
e09810bfff
Added hotkey and the accelerator to the top menu ( #4097 )
2024-06-17 12:46:04 +02:00
Caleb Owens
58ea9879ba
Add a shortcut and menu item to access settings
...
Co-authored-by: Louis <h1ghbre4k3r@dev.bre4k3r.de>
2024-06-17 11:05:47 +02:00
Sebastian Thiel
b27fff77ad
fix performance issue that seems to be introduced by the FileIdMap
...
This disables the cache entirely which would have been the case before
the refactor as well.
This time, it's explicit though.
2024-06-16 09:44:22 +02:00
Sebastian Thiel
843841981c
minor refactor
2024-06-16 09:38:24 +02:00
Sebastian Thiel
184f557897
move debouncer code into its own crate
...
That way the public API that isn't used doesn't have to be `dead_code`.
Also adjust CI to run the tests we have in the debouncer crate.
Previously, it might not have run them though.
2024-06-16 09:38:24 +02:00
Sebastian Thiel
3723cd279c
enable rename-tracking by FileId by configuring the cache.
2024-06-16 09:38:24 +02:00
Sebastian Thiel
a63b88669c
revert from original to modified version
...
This shows the exact changes that were done to the original.
2024-06-16 09:38:24 +02:00
Sebastian Thiel
05d3ef3308
make the original version compile and pass tests, assure it works in-app
...
For the first time, we also add an extra root to the FileId cache which was
unusable before due to the missing configuration.
2024-06-16 09:38:24 +02:00
Sebastian Thiel
3eaaa7f62d
revert debouncer to original version from 0.3.1
...
That way it becomes obvious which changes exactly are needed to make
the flush-functionality working.
This commit will be followed up by a revert to get the flush-changes
back.
2024-06-16 09:38:23 +02:00
Sebastian Thiel
659fc99af0
remove duplicate tests (but keep them as unit-tests this time)
...
Previously the `DebouncerInner` struct was made public to allow the
tests to happen (they initialize it directly), but to keep it closer
to the original, let's keep unit tests this time.
Also I validated that both tests are the same.
2024-06-16 09:38:17 +02:00
Kiril Videlov
64729a9a17
improve performance of workidir diff
2024-06-16 01:54:23 +02:00
Kiril Videlov
41c2ab5908
Merge pull request #4086 from gitbutlerapp/add-mempack-backend-reset-oops
...
feat: Add in-memory method to open temporary repository for comparing or getting diffs.
2024-06-15 21:49:15 +02:00
Kiril Videlov
be975b7038
refactor: Remove commented-out code for conflict handling in virtual branches.
2024-06-15 21:36:56 +02:00
Kiril Videlov
b01f35bf26
feat: Add in-memory method to open temporary repository for comparing or getting diffs.
2024-06-15 21:21:11 +02:00
Mattias Granlund
650a463a16
Fix empty commit marked as integrated
...
- we can't say an empty commit is integrated based on tree ids
2024-06-11 23:38:51 +02:00
Kiril Videlov
a5f3649654
remove repeat tree creation when history is being listed
2024-06-11 20:05:13 +02:00
Kiril Videlov
119107c12b
getting the snapshot diff uses workdir from applied vbranches
2024-06-11 19:51:36 +02:00
Kiril Videlov
8e8a0ffce7
list snapshots uses workdir tree from applied vbranches
2024-06-11 19:09:45 +02:00
Kiril Videlov
f36be87f8a
add the ability to get workdir tree from merging all applied virtual branches from a snapshot
2024-06-11 17:07:04 +02:00
Kiril Videlov
c15125833d
performance: creating an oplog entry does not save a workdir tree
...
We are already storing the virtual branch trees separately, and merging them together can be a slow operation if the index is large.
2024-06-11 13:21:51 +02:00
Caleb Owens
a4f548e411
Diff the correct way round
2024-06-10 15:20:28 +02:00
Kiril Videlov
88e13bd89e
apply hunks in one go for submodules too
2024-06-10 11:23:36 +02:00
Kiril Videlov
ad48640347
set timeout of 2 sec when caching assets
2024-06-09 21:38:20 +02:00
Sebastian Thiel
788958ee08
hide sensitive information from ever being debug-logged
2024-06-09 08:58:17 +02:00
Kiril Videlov
c0710a05e7
captrure update branch errors in snapshot
2024-06-08 22:31:23 +02:00
Luke Carrier
c3242a5a5a
fix: subs{ i => e }quently
2024-06-07 22:39:53 +01:00
Kiril Videlov
1e253b8a59
feat(project): enable new locking by default
2024-06-06 18:08:10 +02:00
Kiril Videlov
5922ed7459
remove error type core: :Error
2024-06-06 16:49:33 +02:00
Kiril Videlov
113d238753
cleanup config.rs unused functions
2024-06-06 16:41:19 +02:00
Kiril Videlov
462a98e5d1
remove unused variants of core: :Error
2024-06-06 16:38:02 +02:00
Kiril Videlov
61dd48f915
on commit sign failure, set signing to false
...
This way, subsequent attempts will succeed
2024-06-06 14:52:25 +02:00
Pavel Laptev
6ee2bee101
text case updated to the Sentance case ( #4016 )
...
* text case updated to the Sentance case
* text case update continue
2024-06-06 14:38:11 +02:00
Sebastian Thiel
d7c8586159
fix serde and some find-replace errors
...
The first problem was that serde needed to see an extra annotation
for deserialzation of Options to work - maybe not the most optimal,
but it works.
The second and bigger issue was a find-replace error where `branch.tree`
was replaced with `branch.head`.
2024-06-06 09:24:53 +02:00
Kiril Videlov
4d2798a1fd
remove unused oid file
2024-06-06 00:45:41 +02:00
Kiril Videlov
0e694c7823
use serde with
2024-06-06 00:43:44 +02:00
Kiril Videlov
9c56a5f040
remove proxy core: :Oid
2024-06-05 22:56:03 +02:00
Caleb Owens
67aad4e597
Filter out unapplied branches
...
We don't have any unstaged changes for unapplied branches, so there is
nothing there to lock.
2024-06-05 22:21:50 +02:00
Caleb Owens
d61879c2a1
Rust... just... please.... 😢
2024-06-05 17:31:37 +02:00
Caleb Owens
ed3294a692
Make clippy a happy clippy
2024-06-05 17:23:11 +02:00
Caleb Owens
31b240265b
Undo all extra refactoring
2024-06-05 17:22:22 +02:00
Caleb Owens
9d93bd8d9d
Defactor workdir
2024-06-05 17:19:26 +02:00
Caleb Owens
c3e9a22454
Put new implementation behind a feature flag
2024-06-05 17:18:12 +02:00
Caleb Owens
d9822be161
Reimplement compute_locks
2024-06-05 17:17:36 +02:00
Kiril Videlov
f915304e34
Merged origin/master into commit-signing-settings
2024-06-05 15:10:06 +02:00
Kiril Videlov
665ab4952a
rm some accidentally duplicated code
2024-06-05 14:41:09 +02:00
Kiril Videlov
f4ec31f81b
fix a bug in handling the case of remote refname being none
2024-06-05 14:31:26 +02:00
Scott Chacon
b8f897e3ae
gotta love rust
2024-06-05 13:41:58 +02:00
Scott Chacon
b60a66452d
merge upstream
2024-06-05 10:17:03 +02:00
Scott Chacon
a6e5abb620
can check commit signing
2024-06-05 10:14:49 +02:00
Kiril Videlov
4a54f74aa2
remove field access
2024-06-05 01:19:23 +02:00
Kiril Videlov
e63081c69d
remove core: :Repository shell type
2024-06-05 01:11:10 +02:00
Kiril Videlov
65a22691ee
Merge pull request #3958 from TheGB0077/vscodium-patch
...
feat: Open with VS Code also opens VS Codium if available, partial fix for #3646
2024-06-04 16:28:55 +02:00
Kiril Videlov
802e3419bd
introduce a convinience GbConfig type
2024-06-04 15:35:29 +02:00
Mattias Granlund
d0993b8acd
Update updated_at
timestamp after mutations
...
- also drops unnecessary `.context()` from most `vb_state.set_branch(...)` calls
2024-06-04 13:52:58 +02:00
Kiril Videlov
76284b0620
when the branch being applied has a merge commit do merge only
2024-06-04 10:10:32 +02:00
TheGB0077
848e33ac45
revert back to any
2024-06-04 04:27:51 -03:00
Mattias Granlund
30c1370140
Include fork point when getting remote branch data
2024-06-04 00:52:09 +02:00
Mattias Granlund
e68dc45359
Show fork point instead of merge base
2024-06-04 00:52:09 +02:00
Kiril Videlov
828bd31a4a
add some additional context to the logs when this fails
2024-06-03 22:05:10 +02:00
Kiril Videlov
28b49be9ae
fail when signing enabled for GitButler but with error code
2024-06-03 21:31:14 +02:00
TheGB0077
21d59b5e05
logic simplified
2024-06-03 14:28:04 -03:00
Kiril Videlov
c611ff7f9b
remove panic from the commit signing flow
2024-06-03 15:30:18 +02:00
Kiril Videlov
7be95b7ea2
better handling if signing fails
2024-06-03 15:28:57 +02:00
Kiril Videlov
40cfc55309
support setting signCommits git config
2024-06-03 17:00:14 +02:00
Caleb Owens
1be0f43d7d
Merge pull request #3968 from gitbutlerapp/fix-There-is-no-default-target-error-on-adding-a-project
...
Services: Improved base branch handling
2024-06-03 14:42:24 +02:00
Caleb Owens
342159ddd4
Services: Improved base branch handling
...
Added a constant for the error message when no default target is set and updated the error handling to use this new message.
2024-06-03 13:31:38 +02:00
Kiril Videlov
3d925d9c53
applying a branch should use cherry rebase
2024-06-03 11:59:42 +02:00
Kiril Videlov
8ab770b15a
move blame to repository extension trait
2024-06-03 01:40:41 +02:00
Kiril Videlov
bc16fadcc5
move commit signing to git2 extension trait
2024-06-03 01:04:14 +02:00
Kiril Videlov
4b6a273e80
remove unused function
2024-06-02 23:47:23 +02:00
Kiril Videlov
b2481f01e1
remove unnecessary checks in oplog commit
...
This little manouver costed us 150 milliseconds
2024-06-02 20:25:09 +02:00
TheGB0077
a77f3ad6e3
VSCodium basic setup
2024-06-02 14:53:37 -03:00
Kiril Videlov
4f8adc487a
Merge pull request #3956 from gitbutlerapp/get-head-reference
...
remove core: :Reference type
2024-06-02 19:14:49 +02:00
Kiril Videlov
4ae1847a28
remove core: :Reference type
2024-06-02 19:03:03 +02:00
Kiril Videlov
879a07da64
remove core: :Index
2024-06-02 17:57:18 +02:00
Caleb Owens
c7651d7c52
Enable moving by more than one commit at a time
2024-06-02 17:37:23 +02:00
Kiril Videlov
e18684fcdb
remove the auto detect git flow
...
It was complex, buggy and slow
2024-06-02 15:48:15 +02:00
Kiril Videlov
5927ca4ac5
remove shell core: :Config type
2024-06-02 14:26:09 +02:00
Kiril Videlov
5bb2dfb0b5
remove unused methods on repository
2024-06-01 23:36:56 +02:00
Kiril Videlov
1206a504c9
remote git::Remote shell type
2024-06-01 23:30:25 +02:00
Kiril Videlov
8084335bc5
Merge pull request #3946 from gitbutlerapp/rm-unused-file
...
remove unused file
2024-06-01 21:48:05 +02:00
Kiril Videlov
abe2d5458a
Merge pull request #3945 from gitbutlerapp/refname-from-git2-branch
...
remove shell type git::Branch
2024-06-01 21:38:24 +02:00
Sebastian Thiel
39b2b91916
Merge pull request #3942 from gitbutlerapp/dependabot/cargo/rust-updates-668fed6552
...
Bump the rust-updates group with 17 updates
2024-06-01 21:38:07 +02:00
Kiril Videlov
7f06d988d6
remove unused file
2024-06-01 21:34:37 +02:00
Kiril Videlov
428566492b
remove shell type git::Branch
2024-06-01 21:25:27 +02:00
Sebastian Thiel
1f22948296
downgrade mock-instant to get watcher tests to work
2024-06-01 21:24:57 +02:00
Kiril Videlov
a4afd0d0df
notify of branch being unapplied only for these that we indeed applied before
2024-06-01 19:26:03 +02:00
dependabot[bot]
398558d063
Bump the rust-updates group with 17 updates
...
Bumps the rust-updates group with 17 updates:
| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde ) | `1.0.199` | `1.0.203` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.59` | `1.0.61` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.37.0` | `1.38.0` |
| [toml](https://github.com/toml-rs/toml ) | `0.8.12` | `0.8.13` |
| [anyhow](https://github.com/dtolnay/anyhow ) | `1.0.82` | `1.0.86` |
| [backtrace](https://github.com/rust-lang/backtrace-rs ) | `0.3.71` | `0.3.72` |
| [itertools](https://github.com/rust-itertools/itertools ) | `0.12.1` | `0.13.0` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.116` | `1.0.117` |
| [open](https://github.com/Byron/open-rs ) | `5.1.2` | `5.1.3` |
| [tauri-build](https://github.com/tauri-apps/tauri ) | `1.5.1` | `1.5.2` |
| [sysinfo](https://github.com/GuillaumeGomez/sysinfo ) | `0.30.11` | `0.30.12` |
| [nix](https://github.com/nix-rust/nix ) | `0.28.0` | `0.29.0` |
| [tokio-util](https://github.com/tokio-rs/tokio ) | `0.7.10` | `0.7.11` |
| [parking_lot](https://github.com/Amanieu/parking_lot ) | `0.12.1` | `0.12.3` |
| [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam ) | `0.5.12` | `0.5.13` |
| [mock_instant](https://github.com/museun/mock_instant ) | `0.3.2` | `0.4.0` |
| [rstest](https://github.com/la10736/rstest ) | `0.18.2` | `0.20.0` |
Updates `serde` from 1.0.199 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.203 )
Updates `thiserror` from 1.0.59 to 1.0.61
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.59...1.0.61 )
Updates `tokio` from 1.37.0 to 1.38.0
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0 )
Updates `toml` from 0.8.12 to 0.8.13
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.12...toml-v0.8.13 )
Updates `anyhow` from 1.0.82 to 1.0.86
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.82...1.0.86 )
Updates `backtrace` from 0.3.71 to 0.3.72
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases )
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.71...0.3.72 )
Updates `itertools` from 0.12.1 to 0.13.0
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0 )
Updates `serde_json` from 1.0.116 to 1.0.117
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.116...v1.0.117 )
Updates `open` from 5.1.2 to 5.1.3
- [Release notes](https://github.com/Byron/open-rs/releases )
- [Changelog](https://github.com/Byron/open-rs/blob/main/changelog.md )
- [Commits](https://github.com/Byron/open-rs/compare/v5.1.2...v5.1.3 )
Updates `tauri-build` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/tauri-apps/tauri/releases )
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-build-v1.5.1...tauri-build-v1.5.2 )
Updates `sysinfo` from 0.30.11 to 0.30.12
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md )
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits )
Updates `nix` from 0.28.0 to 0.29.0
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/compare/v0.28.0...v0.29.0 )
Updates `tokio-util` from 0.7.10 to 0.7.11
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.10...tokio-util-0.7.11 )
Updates `parking_lot` from 0.12.1 to 0.12.3
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.1...0.12.3 )
Updates `crossbeam-channel` from 0.5.12 to 0.5.13
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases )
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.12...crossbeam-channel-0.5.13 )
Updates `mock_instant` from 0.3.2 to 0.4.0
- [Commits](https://github.com/museun/mock_instant/compare/v0.3.2...v0.4.0 )
Updates `rstest` from 0.18.2 to 0.20.0
- [Release notes](https://github.com/la10736/rstest/releases )
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/la10736/rstest/compare/v0.18.2...v0.20.0 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: rust-updates
- dependency-name: toml
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: backtrace
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: itertools
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: rust-updates
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: open
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: tauri-build
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: sysinfo
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: nix
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: rust-updates
- dependency-name: tokio-util
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: parking_lot
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: crossbeam-channel
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: mock_instant
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: rust-updates
- dependency-name: rstest
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: rust-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-01 15:38:43 +00:00
Sebastian Thiel
83893a9db3
review error docs to fit the latest changes
2024-06-01 15:24:59 +02:00
Sebastian Thiel
567a077582
simplify core::errors and remove all the cruft
2024-06-01 14:37:41 +02:00
Sebastian Thiel
0ef944ed25
Switch thiserror
with anyhow
based errors in application code
...
This should simplify most code.
2024-06-01 14:36:08 +02:00
Sebastian Thiel
a10b19ed2c
reomve all thiserror
based errors from controllers
2024-06-01 14:36:08 +02:00
Sebastian Thiel
939624f725
Remove all custom errors from virtual branches module.
...
In order to do that, errors from other modules have to go as well.
2024-06-01 14:36:05 +02:00
Sebastian Thiel
f82d25741e
use Marker
in place of Code::ProjectInvalid
...
That way, the frontend doesn't see internals.
2024-06-01 14:34:16 +02:00
Sebastian Thiel
e7c1d6033a
Remove all errors that don't trigger a custom code or context
2024-06-01 14:34:16 +02:00
Sebastian Thiel
c0fc0cfde5
Remove BranchNotFound
struct
2024-06-01 14:34:16 +02:00
Sebastian Thiel
a95c48a6cf
remove DefaultTargetNotSet in favor of a utility function
2024-06-01 14:34:16 +02:00
Sebastian Thiel
61a53c6346
Another pass at removing ProjectConflict
...
As this causes quite a lot of changes, there is this commit to capture them.
2024-06-01 14:34:13 +02:00
Sebastian Thiel
1dc52a44c0
restore detection of project conflicts
...
Previously that variant was removed even though we need it now to
easily detect this case.
2024-06-01 14:32:27 +02:00
Sebastian Thiel
20d84247e9
Prune Code
to only what's used by the UI
...
Also adjust the `Code` documentation to clarify this - otherwise
we will have more and more variants and nobody actually cares.
The frontend code is adjusted as well, as its `Code` counterpart
contained unsused variants which are now removed.
2024-06-01 14:32:27 +02:00
Sebastian Thiel
d689f36e7f
various refactors
...
Also
- add tests for ref-log file to assure it's not zero (but something more sensible)
- remove generic for convenience on most callsites
2024-06-01 14:32:19 +02:00
Kiril Videlov
d164457299
update_base_branch returns unapplied branches list
...
If merge conflicts caused branches to become unapplied, return them as a list
2024-06-01 13:11:53 +02:00
Ani Betts
035736a245
Fix the test paths
2024-05-31 15:27:16 +02:00
Ani Betts
4363f0fcc4
Leave these exports here in case we need them later
2024-05-31 15:27:16 +02:00
Ani Betts
73ab4bdd90
First hack at readding the tests
2024-05-31 15:27:16 +02:00
Ani Betts
3e34a92634
Chill out some of these logs
2024-05-31 15:27:16 +02:00
Ani Betts
bc31c65fc3
Let's just get it working
2024-05-31 15:27:16 +02:00
Ani Betts
2b3690308c
Roll back to v0.3.1 + flush changes
2024-05-31 15:27:15 +02:00
Mattias Granlund
97dfa93bda
Remove error logging related to blame
...
- blame range can include commits not in vbranch
- lookup returning none expected behavior
2024-05-31 02:37:47 +02:00
Mattias Granlund
b47a947398
Fix blame merge base
...
- use the merge base of the first commits on active branches
2024-05-31 01:57:59 +02:00
Kiril Videlov
4b8d97a500
save error on undo commit snapshot
2024-05-30 23:59:30 +02:00
Kiril Videlov
0f482934c8
save error on unapply branch snapshot
2024-05-30 23:44:58 +02:00
Kiril Videlov
618c7adedc
save error on apply branch snapshot
2024-05-30 22:31:16 +02:00
Kiril Videlov
d7ae4d85f1
first stab at saving errors in snapshots
2024-05-30 22:07:02 +02:00
Kiril Videlov
2e788de86f
Revert "fix: performance issue "
2024-05-30 20:10:23 +02:00
Kiril Videlov
e908828b3a
Merge pull request #3910 from gitbutlerapp/check-mergeable-state-of-virtual-branch
...
feat: Show merge base of virtual branch in commit list
2024-05-30 20:03:18 +02:00
Kiril Videlov
e6f75dae0f
fix: performance issue
...
this is an undo of cdf508e04c
2024-05-30 19:35:10 +02:00
Mattias Granlund
10df1621a7
Keep change id when amending a commit
2024-05-30 19:09:18 +02:00
Kiril Videlov
088eb23f8e
feat: Show merge base of virtual branch in commit list
2024-05-30 18:41:40 +02:00
Kiril Videlov
909894149f
fix a small thing
2024-05-30 17:51:27 +02:00
Kiril Videlov
8550965d14
oopsie
2024-05-30 16:33:28 +02:00
Kiril Videlov
3af46b3cae
handle merge commits
2024-05-30 16:23:40 +02:00
Kiril Videlov
7c06114ab2
list_remote_commit_files: on merge commit dont show wrong diffs
...
Right now it's not possible to show the correct diff because libgit2 doesn't have a `git diff-tree --cc` equivalent
2024-05-30 15:29:27 +02:00
Mattias Granlund
ed0663ce10
Fix invalid commit range in blame operation
...
- fixes commit_to_branch related errors
- fixes big performance problem when force push disallowed
2024-05-30 16:15:12 +02:00
Caleb Owens
251424d567
Fix origin/master showing in sidebar
2024-05-30 13:56:39 +02:00
Kiril Videlov
93d019afce
Merge pull request #3901 from gitbutlerapp/update-reflog-time
...
fixes reflog timestamps
2024-05-30 12:14:21 +02:00
Mattias Granlund
eeb99090ad
Fix incorrect workspace_head during merge conflicts
...
- without this we get an incorrect diff
2024-05-30 12:09:27 +02:00
Kiril Videlov
06ea63ee7c
fixes reflog timestamps
...
Time stapms are super imporatant for this (thanks @schacon) - without a correct time stamp, the trees will be GC'd
2024-05-30 12:02:30 +02:00
Kiril Videlov
62a3d02303
remove git::signature shell type
2024-05-29 23:51:26 +02:00
Kiril Videlov
ff9e36fb21
simplify git signature use
2024-05-29 23:37:32 +02:00
Kiril Videlov
8496dbf044
remove git::treebuilder in favor of plain git2 builder
2024-05-29 23:03:25 +02:00
Kiril Videlov
c3f374af72
remove git::FileMode shell type
2024-05-29 22:42:27 +02:00
Sebastian Thiel
7f9462a857
refactor CommitExt
...
- remove conflicting `*_gb()` methods as the native ones are easy enough to use
- some minor refactor
2024-05-29 21:47:03 +02:00
Sebastian Thiel
d5708b38bb
assure reflog is recreated if not present even if ref is present
2024-05-29 21:16:52 +02:00
Kiril Videlov
fb069e5d39
feat(git): remove unused Blob type
2024-05-29 18:14:50 +02:00
Sebastian Thiel
96dc9d2887
fix oplog-worktree merging
2024-05-29 17:58:54 +02:00
Sebastian Thiel
407ec1427b
Get performance metrics for get_wd_tree()
...
It's a tiny little function, but I think it can be slow
as it could incur a lot of work, scaling up with the size
of the repository, and the amount of untracked data in it.
Let's gather some data.
2024-05-29 17:56:12 +02:00
Kiril Videlov
d3aa5c4908
remove git::Commit wrapper type
2024-05-29 17:35:30 +02:00
Kiril Videlov
45979b4c85
remove usage of git::Commit
2024-05-29 17:33:57 +02:00
Sebastian Thiel
1abb464845
Merge pull request #3885 from gitbutlerapp/rust-remote-tweaks-for-byron
...
Tweaks to remotes code
2024-05-29 15:13:02 +02:00
Kiril Videlov
be149a5569
remove git::Tree in favor of just git2::Tree
2024-05-29 14:30:59 +02:00
Kiril Videlov
9e4bbdedec
remove unused reader functions
2024-05-29 14:04:51 +02:00
Kiril Videlov
d97bba0001
remove git::Tree from branch
2024-05-29 13:24:47 +02:00
Kiril Videlov
3c151a52cb
create a tree extension trait
...
this is useful for preserving functionality that we have added on top of git2::Tree
2024-05-29 11:15:46 +02:00
Caleb Owens
4ba15c3663
Make clippy a happy clippy
2024-05-29 11:14:29 +02:00
Caleb Owens
faa476875d
Replace &BranchId to BranchId
2024-05-29 11:07:36 +02:00
Caleb Owens
0db12b5115
Don't pass references to project_id
2024-05-29 10:47:11 +02:00
Caleb Owens
c5d841a417
Tweaks to remotes code
2024-05-29 09:52:03 +02:00
Kiril Videlov
4db276354b
remove unused import
2024-05-28 23:32:33 +02:00
Kiril Videlov
cc5e0bd8bd
remove unused repository method
2024-05-28 23:20:26 +02:00
Kiril Videlov
ce5e57d5ac
move get_wd_tree to git2::Repository extension trait
...
This way we reduce drilling and allow ourselves to eventually remove core::git types
2024-05-28 23:17:54 +02:00
Caleb Owens
9956e9f889
Introduce rust code for listing and adding remotes
2024-05-28 11:54:01 +02:00
Caleb Owens
6d1ed8474c
rename fetch_from_target to fetch_from_remotes
2024-05-28 10:14:35 +02:00
Kiril Videlov
f9ca7374e8
Merge pull request #3867 from Byron/ops-review
...
oplog-review
2024-05-28 17:35:43 +02:00
Sebastian Thiel
b0e73e5c89
oplog review
2024-05-28 17:22:02 +02:00
Kiril Videlov
e5fa064be5
Merge pull request #3873 from gitbutlerapp/update-gitbutler-integration
...
skip signing of the integration commit
2024-05-28 17:06:49 +02:00
Mattias Granlund
785bd3fb39
Fix slightly confusing code related to merging in trunk
...
- easier to understand if we only set branch.tree in one place
- enable ? return for git errors
2024-05-28 16:58:48 +02:00
Kiril Videlov
3494585679
plain commits for integration stuff
...
more
asdf
2024-05-28 16:48:07 +02:00
Josh Junon
7098fbc11b
disable stdin for invocations of ssh-keygen when signing commits
2024-05-28 13:44:24 +02:00
Sebastian Thiel
12e45142b3
recover from empty reflog files for gitbutler/target
ref
...
This also improves the tests quite a bit as it incorporates fixes
in `gix-ref`.
Also rename variables to be more descriptive, so instead of `something_sha`
name it `something_commit` as the object type is among the most interesting
bits of an object.
2024-05-28 13:25:46 +02:00
Sebastian Thiel
e82950f177
refactor reflog.rs and slightly adjust snapshot.rs
...
* reflog
- use `gix` to parse reflog, both in code as well as in tests (to be sure it's not malformed)
- avoid double-writes to reflog, instead finish transformation in memory and write final result
- assure the ref is present, independently of the reflog, catching more 'weird' states.
* minor improvements to `snapshot.rs` to avoid unnecessary clones
2024-05-28 13:25:46 +02:00
Sebastian Thiel
d952db0920
adjust pub
to make sense for actual usage (and after trait removal)
2024-05-28 13:25:46 +02:00
Sebastian Thiel
590d713f91
use git2::Oid
instead of String
; various small refactors
2024-05-28 13:25:46 +02:00
Sebastian Thiel
a5f71be44c
avoid separate exists-checks in favor of detailed error handling
...
That way we are less racy and do less IO.
2024-05-28 13:25:46 +02:00
Sebastian Thiel
e3156ba75c
remove single-use traits while leaving the structure as is
2024-05-28 13:25:46 +02:00
Sebastian Thiel
346c96869e
small refactors (see body for details)
...
- instrument snapshot creation to assure we see errors (which are ignored in code)
- move tests for public `entry` types into integration tests
- rename `OperationType` to `OperationKind` as it's more commmon in Rust
- Use `Copy` where possible
- streamline implementation: remove clones and allocations, without going zero-copy
- Prefer direct calls to traits to avoid `write!("{}")` just to invoke a trait fmt implementation
- avoid `pub` when `pub(crate)` will do
- strong type for created_at
2024-05-28 13:25:46 +02:00
Sebastian Thiel
9270ad9c1f
Assure tests don't pick up the developers signing configuration.
...
Otherwise tests will end up signing commits which is slow and
a side-effect we should test for explicitly.
2024-05-28 13:25:46 +02:00
Sebastian Thiel
6224c70695
fix integration test structure to assure tests run only once.
...
Previously, tests were included by `app.rs` which is the entrypoint
for intgration tests, but there were also loose `.rs` files which
each count as separate test (with their own binary).
This wasn't intended and I don't know what happened there,
so now `core.rs` is the entrypoint.
2024-05-28 13:25:45 +02:00
Caleb Owens
571f16b8b2
Allow non-origin main branches to be listed
2024-05-24 15:22:34 +02:00
Caleb Owens
27f3b65b79
Fetch non-origin remotes
2024-05-24 14:58:56 +02:00
Kiril Videlov
1fbb756183
remove unused feature flag for snapshotting feature
2024-05-26 23:50:19 +02:00
Sebastian Thiel
f6dcf5d8c6
avoid assertions as they may cause the UI to 'hang' ( #2657 )
...
Panicked commands lead to timeouts, which are hard to debug unless
one sees the panic information in the log.
2024-05-26 08:44:55 +02:00
Kiril Videlov
762bb31dea
first stab at resurecting git sync
2024-05-25 23:07:40 +02:00
Kiril Videlov
f71b76ccb4
Merge pull request #3859 from Byron/win-tempfile
...
minor Windows adjustments
2024-05-25 22:08:32 +02:00
Kiril Videlov
bf3611fefa
feat: Add support for trailers with newlines
...
Escaping the newlines since the tailers are new line delimited. This is relevant when storing things like commit messages
2024-05-25 21:03:14 +02:00
Sebastian Thiel
73c21f2e42
provide more information in watcher-related errors
...
related to https://github.com/gitbutlerapp/gitbutler/issues/2657#issuecomment-2131307753
It turns out that the UI triggers `set_project_active()`, and then moves on and emits more
commands, some of which depend on a watcher being present.
The UI could wait, but even if it does the 'endless spinner' happens.
2024-05-25 20:35:40 +02:00
Sebastian Thiel
f59268fb25
Allow local overrides for the target triple of production windows builds.
...
The use-case is somewhat specific as it allows developers to do:
```
export TRIPLE_OVERRIDE=x86_64-pc-windows-msvc
```
and build the binary as x86 even on an ARM VM.
The reason ARM builds don't work natively is the `win32` crate,
which simply doesn't work there.
It could be another step to replace it with something that does
to get ARM builds, but probably that will only happen once
there is demand for native ARM windows builds.
2024-05-25 15:05:43 +02:00
Sebastian Thiel
a176bf04cf
remove Windows experiment ( #3601 )
...
The sync-all didn't do anything, and one would still run into locked
files.
2024-05-25 09:10:11 +02:00
Sebastian Thiel
9245e3458f
now_since_unix_epoch_ms
now uses negative dates for times pre Unix-epoch
2024-05-25 07:45:18 +02:00
Sebastian Thiel
2ed708b298
remove chrono which was only used for 'now in milliseconds, relative to UNIX epoch'
2024-05-24 21:38:11 +02:00
Kiril Videlov
623500a25e
remove unsed branch from implementation
2024-05-24 20:29:31 +02:00
Kiril Videlov
319550d7b5
Merge pull request #3850 from Byron/review-and-refactor
...
Watcher adjustments
2024-05-24 16:38:18 +02:00
Sebastian Thiel
e68b789a32
remove unused methods in FileId
map, and revert to what seemed functional.
...
Previously, roots were always empty and it was unclear what the purpose
of the customization was.
It's probably best to re-add it along with a test maybe.
2024-05-24 16:21:26 +02:00
Sebastian Thiel
cdf508e04c
Show what changed to get the version we currently have
...
This reverts commit 547f2ffada
.
That way it's more obvious when looking at the history what was added
and changed.
2024-05-24 15:44:13 +02:00
Sebastian Thiel
547f2ffada
re-add original code to see what changed
2024-05-24 15:42:17 +02:00
Sebastian Thiel
6596f3956e
adapt debouncer tests with the changed codebase
2024-05-24 15:38:46 +02:00
Caleb Owens
4cae28668b
Merge branch 'master' into revert-3830-core-util-duration-updates
2024-05-24 14:20:55 +02:00
Sebastian Thiel
edd8d54950
copy tests from notify-debouncer-full
as well (verbatim)
...
While at it, remove the docs as they are referring to the original source code.
Tests should help to understand how it is supposed to work.
Note that the copy is verbatim and modifications will happen in a separate commit,
along with the necessary license declarations.
2024-05-24 13:50:03 +02:00
Sebastian Thiel
86edb4627d
reorganize watcher modules for more consistency
2024-05-24 13:28:34 +02:00
Sebastian Thiel
80b9598d5a
remove (some) unused code; minor refactor
2024-05-24 13:28:33 +02:00
Sebastian Thiel
2080b62864
add license for code taken from notify-debouncer-full
2024-05-24 13:19:37 +02:00
Sebastian Thiel
5906eb1a35
change debounce-events to trace
so they don't dominate the log
...
Ideally it's usable even in debug mode.
2024-05-24 12:41:26 +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
983b2a3101
Merged origin/master into core-util-duration-updates
2024-05-23 14:26:28 +02:00
Caleb Owens
c2a1f6a7e7
Fix various tests
2024-05-23 14:26:16 +02:00
Kiril Videlov
2339be4551
Merge pull request #3827 from Byron/watcher-performance
2024-05-23 14:10:04 +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
Sebastian Thiel
850045e9d3
Allow to watch multiple directories in case of special setups
...
Like worktrees - these could work now from a watchers perspective.
2024-05-23 13:04:02 +02:00
Sebastian Thiel
9ad010bd0f
Assure we fail gracefully git-dir and worktree-dir are unusual
...
This could be supported, but would require more changes to get right.
For now, fail gracefully instead of failing strangely because we don't
watch everything that needs watching.
2024-05-23 12:55:45 +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
Sebastian Thiel
05118086dd
Use gitoxide
in file-watcher
...
This allows for faster opening times, and more more efficient
exclude checks.
2024-05-23 11:13:56 +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
Mattias Granlund
8b7e12e472
Remove explicit error type for merge_virtual_branch_upstream
2024-05-23 10:58:59 +02:00
Sebastian Thiel
a83e6809ab
Only open a repository when project-files are involved.
...
There are many filesystem events that are not touching files which
could be ignored.
Now we detect this case in advance and only open the project repository
if we know there are files to check for their ignore state.
That way, there should overall be less IO, which is good for performance
particularly on Windows.
2024-05-23 10:50:38 +02:00
Sebastian Thiel
e3b8e2a5e5
fix: assure commit.gpgsign
is detected correctly
...
Avoid stringly comparison for what is definitely a boolean
[as per the configuration](https://git-scm.com/docs/git-config#Documentation/git-config.txt-commitgpgSign ).
2024-05-23 10:18:35 +02:00
Sebastian Thiel
93508d7e7c
fix: assure tests aren't affected by local configuration
...
Otherwise, tests will pickup global configuration, which can affect them.
For instance, if `core.gpgsign` is true, it will cause commits to be signed
which can be slow, or hang entirely if gpg-agent requests a password.
Note that now there is possibly no tests that validates signing,
and doing so is difficult as it requires gpg and keys to be setup.
2024-05-23 10:12:40 +02:00
Kiril Videlov
b8dfcf7a82
Merge pull request #3822 from gitbutlerapp/revert-3820-oplog-diff-optimization
...
Revert "fixes incorrect snapshot diff"
2024-05-23 03:31:00 +02:00
Kiril Videlov
651a55d3fb
Revert "fixes incorrect snapshot diff"
2024-05-23 03:17:34 +02:00
Kiril Videlov
c3a18ef2b0
feat(oplog): Improve lines_since_snapshot
by using tree-to-tree comparison
...
This fixes an issue where snapshots are auto-created too often erroneously
2024-05-23 02:46:40 +02:00
Kiril Videlov
3517419090
fixes incorrect snapshot diff
2024-05-23 01:10:28 +02:00
Kiril Videlov
9dbebba5df
refactor: Improve error handling in branch_to_remote_branch() and list_remote_branches() functions
2024-05-22 14:20:41 +02:00
Kiril Videlov
660d296745
Merge pull request #3814 from gitbutlerapp/update-change-selected-for-changes-branch
...
fix: Use old branch name instead of selected_for_changes in Snapshot creation
2024-05-22 12:32:46 +02:00
Kiril Videlov
f68ce21962
fix: Use old branch name instead of selected_for_changes in Snapshot creation
2024-05-22 12:20:59 +02:00
Caleb Owens
f2471734b4
Fix timestamp compensation
2024-05-22 12:17:04 +02:00
Scott Chacon
8b7fe790e5
return all local branches as well as remote ones
...
also deduplicate them in the branch listing
2024-05-22 10:45:29 +02:00
Pavel Laptev
ec8b171fc7
Project menu items update + new "Open in VS code" ( #3804 )
2024-05-21 23:57:38 +02:00
Kiril Videlov
eda9651bf9
Merge pull request #3800 from anaisbetts/no-dosbox-on-sign
...
Don't show command prompt when commit signing is enabled
2024-05-21 23:33:22 +02:00
Kiril Videlov
9f318626f8
Merge pull request #3737 from anaisbetts/flushable-debounce
...
Avoid file locks by being smarter about when we try to rebuild our information
2024-05-21 13:47:54 +02:00
Ani Betts
a47ebbc22d
Don't show command prompt when commit signing is enabled
2024-05-21 12:04:41 +02:00
Mattias Granlund
21e98fd9f2
Simplify getting default target
...
- remove try function in favor of returning error
- drop unused function
2024-05-21 12:02:38 +02:00
Ani Betts
f54c12fd55
Halve the dead air time
2024-05-21 11:03:18 +02:00
Anaïs Betts
d23ca10028
Bring back tempfile moves
2024-05-21 10:36:22 +02:00
Ani Betts
12143b0a54
Embrace your Chill, cargo
2024-05-21 10:39:00 +02:00
Ani Betts
b4b0de6a3c
Merge remote-tracking branch 'upstream/master' into flushable-debounce
...
* upstream/master: (85 commits)
History and minor UI fixes (#3797 )
History fixes (#3796 )
make GitGuardian happy
bump playwright version
add vitest exclude for node_modules
Remove unused exports from ipc
Update auth.ts to use absolute import
Use correct invoke function
setup for async tasks on oplog update
formatting
save and restore the gitbutler/integration branch
remove unneccessary CSPs
Fix ollama request security
fix: forgot the port
feat: Set default snapshot lines threshold to 20 when undefined
fix: Updated connect-src to allow local connections for ollama
Minor tweaks to CSS and use real branch name
Unmount history component when hidden
Fix bug leaving PR button visible
Small refactor of history component
...
2024-05-21 10:29:42 +02:00
Pavel Laptev
6e6272983b
History and minor UI fixes ( #3797 )
...
* Convert Capital case to Uper case "History menu"
* UI updates: target branch styles
* Remove console.log
* CSS: space between "Trunk" and the timer
* UI: reversed chevron arrows fix
* remove commented console.log
* UX: toggle file preview in History
* UI: target branch set animation fix
2024-05-21 01:07:22 +02:00
Kiril Videlov
662a62c2f2
setup for async tasks on oplog update
...
As we start building out code collaboration we wanna have the ability to push gitbutler state to, when enabled
2024-05-19 15:53:27 +02:00
Scott Chacon
18de60740b
formatting
2024-05-19 07:24:15 +02:00
Scott Chacon
2a89fa6b93
save and restore the gitbutler/integration branch
...
when we save the snapshots, save and restore the integration branch commit properly so we don't get in a weird state after restore
2024-05-19 07:07:55 +02:00
Kiril Videlov
b3a1699cbf
Merge pull request #3786 from gitbutlerapp/Virtual-branch-1
...
remove unneccessary CSPs
2024-05-18 18:26:51 +02:00
Kiril Videlov
7e070ac0f5
remove unneccessary CSPs
2024-05-18 18:13:24 +02:00
Kiril Videlov
07b863731f
Merge pull request #3785 from gitbutlerapp/fix-ollama-request-security
...
Fix ollama request security
2024-05-18 18:08:39 +02:00
Caleb Owens
6ae9b7ff6e
Fix ollama request security
2024-05-18 16:51:20 +01:00
Kiril Videlov
a9316492c9
fix: forgot the port
2024-05-18 17:49:05 +02:00
Kiril Videlov
8fa8cbfe6d
fix: Updated connect-src to allow local connections for ollama
2024-05-18 16:28:19 +02:00
Scott Chacon
733780f302
reformat
2024-05-17 15:16:04 +02:00
Scott Chacon
dcc1b37331
rewrite our oplog tests
2024-05-17 15:11:19 +02:00
Scott Chacon
1cbcbb3478
change the oplog file name
...
this is both to be a little more clear, but mainly to reset users from the previous logic
2024-05-17 15:11:19 +02:00
Scott Chacon
62e9a80512
add logic for the first parentless snapshot
2024-05-17 15:11:19 +02:00
Scott Chacon
0f3005e467
first pass at new oplog tree builder
...
creates a work tree and properly restores
note
2024-05-17 15:11:19 +02:00
Kiril Videlov
74fe02f109
feat: Add support for setting snapshot_lines_threshold in UpdateRequest
2024-05-17 12:44:20 +02:00
Pavel Laptev
1be1218a71
History View UI ( #3773 )
...
* Separated History logic layout into components
* Layout update, components split and cover new data
* Added file preview
* handle event trigger
* empty states added
* Temp store for snapshot files + threshold section
* formatting
* added a gap between elements in footer
* CSS: padding fix
2024-05-17 01:21:19 +02:00
Ani Betts
2ff2b1f7ec
Format
2024-05-15 20:27:26 +02:00
Ani Betts
ddc2cfeb67
Flush on window focus
2024-05-15 20:27:26 +02:00
Ani Betts
e9cd5d3dca
Rewrite the timeouts
...
Change the strategy of how timeouts work, from a simple timer, to
something a bit more nuanced
2024-05-15 20:27:26 +02:00
Ani Betts
326e9fee02
Wire flushing into the Watcher
...
Give the main window a mechanism to flush pending changes via a Channel
2024-05-15 20:27:26 +02:00