Kiril Videlov
3be7d600e0
move fs and storage intor separate crates
2024-07-09 12:54:08 +02:00
Kiril Videlov
55b8a0357b
move id module to its own crate
2024-07-09 12:39:18 +02:00
Kiril Videlov
25ec331791
move secret module out of core into own crate
2024-07-09 12:11:12 +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
Kiril Videlov
de200c8e20
move reference module from core to its own crate
2024-07-09 01:14:28 +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
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
e93896621f
move project module in a separate gitbutler-project crate
2024-07-08 15:33:26 +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
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
c62c43ed6c
remove useless indirection when getting index size
2024-07-07 23:22:58 +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
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
9eaab28a48
move base branch implementation to branches crate
2024-07-07 16:29:24 +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
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
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
fe7f1167bf
virtua branches controller - rm deps on project controller
2024-07-04 15:26:10 +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
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
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
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
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
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
d8a7f2bbdc
fix: cleanup build npm scripts
2024-06-28 11:34:44 +02:00
ndom91
091b45d5e9
feat: create separate component library subpackage
2024-06-26 18:01:09 +02:00
Kiril Videlov
4a0cf76b53
make RPM bundles
2024-06-25 20:44:11 +02: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
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
Kiril Videlov
9c56a5f040
remove proxy core: :Oid
2024-06-05 22:56:03 +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
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
TheGB0077
848e33ac45
revert back to any
2024-06-04 04:27:51 -03:00
TheGB0077
21d59b5e05
logic simplified
2024-06-03 14:28:04 -03:00
Kiril Videlov
40cfc55309
support setting signCommits git config
2024-06-03 17:00:14 +02:00
Kiril Videlov
bc16fadcc5
move commit signing to git2 extension trait
2024-06-03 01:04:14 +02:00
TheGB0077
a77f3ad6e3
VSCodium basic setup
2024-06-02 14:53:37 -03:00
Kiril Videlov
e18684fcdb
remove the auto detect git flow
...
It was complex, buggy and slow
2024-06-02 15:48:15 +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
a10b19ed2c
reomve all thiserror
based errors from controllers
2024-06-01 14:36:08 +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
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
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
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
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
Sebastian Thiel
590d713f91
use git2::Oid
instead of String
; various small refactors
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
Kiril Videlov
762bb31dea
first stab at resurecting git sync
2024-05-25 23:07:40 +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
Mattias Granlund
021180d8f1
Rename function
2024-05-23 10:58:59 +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
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
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
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
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
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
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
Ani Betts
69cf9c8058
Don't use HOME env var
...
This environment variable doesn't exist on Windows
2024-05-15 17:39:23 +02:00
Ani Betts
1695ad5c53
Add dirs crate
2024-05-15 17:39:00 +02:00
Scott Chacon
d944cad533
merge upstream
...
temp
2024-05-14 10:25:29 +02:00
Kiril Videlov
62dadd96a8
remove unused index subscription
2024-05-13 14:18:56 +02:00
Kiril Videlov
3e0914444f
remove unused crates in tauri
2024-05-12 04:19:19 +02:00
Kiril Videlov
5b3273f542
remove unused sessions / deltas implementation
...
This is removed in favor of the new `ops` module
2024-05-12 03:39:04 +02:00
Kiril Videlov
d9c985db26
Merge pull request #3749 from gitbutlerapp/update-file-event-removal-of-session-id
...
remove sessions/deltas unused tauri events
2024-05-12 03:37:24 +02:00
Kiril Videlov
91e48c6730
remove sessions/deltas unused tauri events
2024-05-12 03:24:36 +02:00
Kiril Videlov
27f0802443
remove gb_reference from projects
2024-05-12 03:08:54 +02:00
Kiril Videlov
3eaaccc2e0
remove deltas calculation on file change
...
This is being replaced by the new `ops` module
Along with the respective tests. There were only session/deletas related assertions in the watcher tests
2024-05-12 02:54:19 +02:00
Kiril Videlov
18cf10a143
remove unused fetch_gb_data
2024-05-12 02:13:02 +02:00
Kiril Videlov
bca8e13dfb
remove unused push_gb_data
2024-05-12 02:05:07 +02:00
Kiril Videlov
2bbe4fa569
remove unused list_deltas endpoint
2024-05-11 21:12:08 +02:00
Kiril Videlov
598fc0ae26
Merge pull request #3744 from gitbutlerapp/remove-sessions-command
...
remove unused list_sessions
2024-05-11 21:09:45 +02:00
Kiril Videlov
14a7e8b2a1
remove unused list_sessions
2024-05-11 20:58:14 +02:00
Kiril Videlov
217efbc932
remove unused project_flush_and_push
2024-05-11 20:52:05 +02:00
Scott Chacon
4d542330c5
merge stuff
2024-05-11 11:43:06 +02:00
Kiril Videlov
62b97f7f5a
remove unused imports
2024-05-10 20:31:07 +02:00
Kiril Videlov
97c072cb7a
remove unused endpoint list_session_files
2024-05-10 20:30:45 +02:00
Kiril Videlov
58c124627a
add an enpoint for getting the snapshot diff
2024-05-09 11:24:42 -07:00
Kiril Videlov
1ae1efeec0
rename tauri module for undo operations
2024-05-08 00:36:16 +02:00
Kiril Videlov
93d5e61530
rename module snapshots to ops
2024-05-08 00:29:38 +02:00
Kiril Videlov
2c065a602e
rename module of oplog trait
2024-05-08 00:29:38 +02:00
Josh Junon
1fd0b1ecfc
make askpass broker a global
2024-05-07 16:07:37 +02:00
Scott Chacon
51f9769024
sign commits with real git
...
in the strangest possible way
2024-05-07 15:15:25 +02:00
Kiril Videlov
1bc41a9146
snapshot list pagination
2024-05-07 00:46:22 +02:00
Josh Junon
0b903bcaef
Merge pull request #3697 from anaisbetts/clean-up-win32-menus
...
Clean up win32 menus
2024-05-06 20:44:40 +02:00
Ani Betts
1309481273
Fix lint
2024-05-06 17:42:34 +02:00
Ani Betts
ec320376ff
Don't have a Window menu on Win32/Linux
...
Generally, we have a Window menu only in apps that can have multiple related windows or tabs. Since we don't have that at the moment, 🔪 the Window menu
2024-05-06 16:28:01 +02:00
Ani Betts
828a7e55b2
We don't need a separate "Close" item on non-macOS
...
Because Win32 and Linux apps generally close when their windows close, we don't need a separate "Close" vs "Quit" item on these platforms
2024-05-06 16:27:25 +02:00
Scott Chacon
ca634807b1
Merge branch 'master' into target-branch-selector-fix
2024-05-06 13:49:27 +02:00
Scott Chacon
344e3d3f38
small rust stuff
2024-05-06 13:44:08 +02:00
Josh Junon
add0a84165
add help menu handler for debug info sharing and remove panic
2024-05-06 12:58:50 +02:00
Josh Junon
cf74b12a3c
Merge pull request #3693 from gitbutlerapp/Help-window-menu
...
"Help" window menu
2024-05-06 12:37:14 +02:00
Pavel Laptev
53d6e58850
match statement update
2024-05-06 12:24:18 +02:00
Pavel Laptev
81ff230fb7
code review fixes
2024-05-06 12:12:39 +02:00
Pavel Laptev
c14fa2f864
version added
2024-05-06 12:05:50 +02:00
Kiril Videlov
5f6ff257d1
refactor snapshotting as an Oplog trait
...
Implemented on Project
2024-05-05 22:28:12 +02:00
Pavel Laptev
e38e68477b
lint fixes
2024-05-05 21:57:45 +02:00
Pavel Laptev
043917ad45
Help window menu added
2024-05-05 21:40:06 +02:00
Scott Chacon
5527d2b6e2
initial implementation of different push target
2024-05-03 11:20:47 +02:00
dependabot[bot]
a1a3abc868
Bump the rust-updates group with 10 updates
...
Bumps the rust-updates group with 10 updates:
| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde ) | `1.0.197` | `1.0.199` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.58` | `1.0.59` |
| [anyhow](https://github.com/dtolnay/anyhow ) | `1.0.81` | `1.0.82` |
| [async-trait](https://github.com/dtolnay/async-trait ) | `0.1.79` | `0.1.80` |
| [chrono](https://github.com/chronotope/chrono ) | `0.4.37` | `0.4.38` |
| [reqwest](https://github.com/seanmonstar/reqwest ) | `0.12.2` | `0.12.4` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.115` | `1.0.116` |
| [ssh-key](https://github.com/RustCrypto/SSH ) | `0.6.5` | `0.6.6` |
| [tauri](https://github.com/tauri-apps/tauri ) | `1.6.1` | `1.6.2` |
| [sysinfo](https://github.com/GuillaumeGomez/sysinfo ) | `0.30.8` | `0.30.11` |
Updates `serde` from 1.0.197 to 1.0.199
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.199 )
Updates `thiserror` from 1.0.58 to 1.0.59
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59 )
Updates `anyhow` from 1.0.81 to 1.0.82
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82 )
Updates `async-trait` from 0.1.79 to 0.1.80
- [Release notes](https://github.com/dtolnay/async-trait/releases )
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.79...0.1.80 )
Updates `chrono` from 0.4.37 to 0.4.38
- [Release notes](https://github.com/chronotope/chrono/releases )
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md )
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.37...v0.4.38 )
Updates `reqwest` from 0.12.2 to 0.12.4
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.2...v0.12.4 )
Updates `serde_json` from 1.0.115 to 1.0.116
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116 )
Updates `ssh-key` from 0.6.5 to 0.6.6
- [Commits](https://github.com/RustCrypto/SSH/compare/ssh-key/v0.6.5...ssh-key/v0.6.6 )
Updates `tauri` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/tauri-apps/tauri/releases )
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v1.6.1...tauri-v1.6.2 )
Updates `sysinfo` from 0.30.8 to 0.30.11
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md )
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.8...v0.30.11 )
---
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: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: async-trait
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: chrono
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: ssh-key
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: tauri
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
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 15:11:55 +00:00
Josh Junon
b350a85e5c
add google images CDN to img-src CSP ( fixes #3516 )
2024-04-30 11:48:00 +02:00
Kiril Videlov
27480c503e
Merge pull request #3629 from gitbutlerapp/remove-rust-posthog-integration
...
remove posthog from the rust code
2024-04-29 16:28:11 +02:00
Scott Chacon
786a834559
Merge pull request #3626 from gitbutlerapp/sc-history-manipulation
...
operation tonkotsu 2
2024-04-29 16:17:57 +02:00
Kiril Videlov
00706b402b
remove posthog from the rust code
...
similar to https://github.com/gitbutlerapp/gitbutler/pull/3628
2024-04-29 16:12:14 +02:00
Kiril Videlov
6439f3333a
remove sentry rust dependencies
2024-04-29 15:54:13 +02:00
Kiril Videlov
83b40eabb6
remove sentry from rust code
...
Since the actually valuable bug reports are submitted by developers as github issues or on our Discord, sentry error reporting is not necessary
2024-04-29 15:46:29 +02:00
Scott Chacon
c5e7fe865c
fix clippy issues
...
fix a few more clippy issues
2024-04-29 15:42:58 +02:00
Scott Chacon
2b1d808314
add several history manipulation backend functions
...
this adds backend functions in Rust to do the following:
* move file hunks between commits (basic)
* undo any commit in a stack
* insert a blank commit
* move a commit within the stack
* update a commit message in place
2024-04-29 15:03:01 +02:00
Kiril Videlov
34d12fb1e6
add snapshotting tests
2024-04-28 20:05:46 +02:00
Kiril Videlov
5420fc3e3c
use new snapshot types
2024-04-26 23:20:31 +02:00
Josh Junon
adcba68220
move multi-file modules to mod.rs and single-file modules to <name>.rs
2024-04-26 11:56:35 +02:00
Sebastian Thiel
ff44a80e74
Merge pull request #3607 from Byron/win-fixes
...
Revert 74eb7bd3
as debounce-timing has no effect (#3601 )
2024-04-25 22:07:37 +02:00
Kiril Videlov
b3c05b7948
fix signatures
2024-04-25 19:23:13 +02:00
Kiril Videlov
753953a7d5
remove tauri endpoint for creating snapshots
2024-04-25 19:23:13 +02:00
Kiril Videlov
a2682e2535
implement undo stack snapshotting
2024-04-25 19:23:13 +02:00
Sebastian Thiel
116f5d02bc
Revert 74eb7bd3
as debounce-timing has no effect ( #3601 )
...
This probably means the raciness is not due concurrency introduced by filesystem events,
which leads me to think that having great 'disk-IO-hygiene` should improve things.'
2024-04-25 16:33:55 +02:00
Sebastian Thiel
29525ffd03
address review comments
...
- rename feature to `windows`
- remove unused config key from `Cargo.toml`, unfortunately `cfg` isn't available for everything
- make sure feature is toggled on on CI when checking and when publishing
2024-04-25 11:29:24 +02:00
Sebastian Thiel
3058ffbc9b
avoid showing colors in Windows logs ( #3601 )
...
People can't copy it without the terminal-escape code, making it harder to read.
2024-04-25 08:19:59 +02:00
Sebastian Thiel
74eb7bd397
on Windows, update far less often on filesystem changes. ( #3601 )
...
By increasing the window size for collecting filesystem events,
knowing that each event is processed in parallel, we might be lucky
and that already reduces the likelyhood of clashes.
It's an experiment though.
On Unix, run with:
`LOG_LEVEL=debug pnpm tauri dev --features adapt-to-windows`
2024-04-25 08:17:11 +02:00
Sebastian Thiel
aa3d3cb7da
fix rustfmt formatting issues due to line-length ( #3039 )
...
The trick is to temporarily set `max_width` in `rustfmt.toml` to 120,
then set it back to the default of 100 (or remove the file).
2024-04-23 12:53:56 +02:00
Sebastian Thiel
be4cd36986
clarify some TODOs to avoid keeping them for too long
...
Note that the comment above 'deltas' merely removed, as it wasn't actionable
without changing the frontend, which can probably already deal with
multiple of these.
Now that types are better understood though, it was straightforward to
change the type of `file_path` to not be a string, which now is even
clearer of a necessity thanks to the `tauri`-independent `watcher` crate.
Also, remove a comment related to the lack of worktree support.
It now fails gracefully, and that will come up again if support should be added.
2024-04-21 11:35:26 +02:00
Kiril Videlov
0fea544cd7
rm gb_repository from controller
2024-04-21 09:26:34 +02:00
Kiril Videlov
72398719bc
rm test command
2024-04-20 00:38:18 +02:00
Josh Junon
d5b34c46f5
mark package info as potentially unused
2024-04-19 16:01:54 +02:00
Josh Junon
7f35537798
only construct about metadata on macos
2024-04-19 15:49:23 +02:00
Josh Junon
ed088f4431
enable devtools on release builds, too
2024-04-19 15:17:44 +02:00
Josh Junon
340eaeaf8c
re-construct the full menu instead of using OS default
2024-04-19 15:15:56 +02:00
Sebastian Thiel
c30ac3ba62
optimize tokio features
...
Previously, the attempt was made to enable only those `tokio` features
that are actually used. However, due to default-features still being
enabled and `tauri` using the `full` feature, for most intents and purposes
that wasn't effective.
Now default features are disabled, and `full` isn't used anymore, forcing
all crates to mention the exact features they need.
Note that `tracing` is missing here, as it wasn't effective previously
without the `--cfg tokio_unstable` option also being specified as rustflag.
2024-04-18 09:48:23 +02:00
Sebastian Thiel
adfbc7c5cc
Remove now unused dependencies from tauri
.
...
These have moved to `watcher` and `analytics` respectively.
2024-04-18 09:25:33 +02:00
Sebastian Thiel
5785085a77
reintegrate watcher
crate into tauri
crate
2024-04-17 22:20:32 +02:00
Kiril Videlov
6f0fe2afa9
rm uses_diff_context from list vbranches return
2024-04-17 07:14:43 +02:00
Vid Luther
4ff94d9f4a
happy 2024
2024-04-16 18:17:51 +02:00
Josh Junon
fa06586cdf
fix devtools on release builds
2024-04-16 16:43:22 +02:00
Mattias Granlund
203da38e8b
Add devtools to view menu
2024-04-16 09:07:11 +01:00
Sebastian Thiel
a3fd06897e
address misc review comments
...
- turn `static` into `const`
2024-04-15 16:55:03 +02:00
Sebastian Thiel
fb9db89e1b
remove '_pure' functions in favor of creating a full handler
in tests.
...
The `pure` functions were from a time where a `Handler` couldn't be instantiated
in full for tests, but that is not the case anymore, so there isn't any use
for the added complexity.
2024-04-15 16:50:20 +02:00
Sebastian Thiel
62b1c49372
avoid &str in place where ProjectId
could be used
2024-04-15 16:23:18 +02:00
Sebastian Thiel
e2ef2dc721
Only watch a single project at a time.
...
Previously it would watch every registered project, which could incur more work
on all parts of the application than necessary.
Now UI sends an event that indicates which project is active, allowing the
watch to be setup in that very moment. It's worth noting that the previously
watched project is automatically deregistered.
2024-04-15 07:19:15 +02:00
Sebastian Thiel
c173d8074d
parallelize the delta computation
2024-04-15 07:11:16 +02:00
Sebastian Thiel
56642830f0
remove rate-limit as it never kicks in, and also, we'd want the computation for correctness
2024-04-15 07:11:16 +02:00
Sebastian Thiel
2e969d1507
collect filemonitor events into lists to avoid excessive recomputation.
...
Previously, each file change both in `.git` as well as in the worktree would
cause a complete recomputation. This computation included opening a git
repository at least once (probaby more often), to make an 'is-ignored' check.
The latter is very expensive in `git2` and gets more expensive the more
files there are.
Now the repository is opened when needed, and we re-use it for all applicable
file paths.
2024-04-15 07:11:16 +02:00
Sebastian Thiel
af225bd9e0
make events
private and publicly export Event
instead.
...
That way, we get `tauri::Event`, without the somewhat confusing
module name `events`.
2024-04-15 07:11:16 +02:00
Sebastian Thiel
2eaba14819
dissolve the event queue in favor of method calls
...
The idea is that we don't parallelize over a channel anymore, but
instead just process filesystem events, one at a time.
This would allow each handler to become a function that gets its
state passed, and makes all the necessary calls verbatim, which
in turn makes it easy to follow what's happening.
If anything becomes to slow due to the serialization of event processing,
selective parallelization can be re-added.
2024-04-15 07:11:09 +02:00
Sebastian Thiel
3902bb9b2d
de-objectify all sub-handlers
...
Sub-Handlers are objects, and with that comes a lot of complexity.
However, there seems to be on need for it at all, and a first
steps is to turn these into methods to truly understand
what's going on.
2024-04-13 23:09:17 +02:00
Sebastian Thiel
27349a2fa2
Remove Clone
in the vincinity of Watchers where possible.
...
This will help to get away from from the 'everything needs to be shared'
approach to state.
2024-04-13 23:09:17 +02:00
Sebastian Thiel
cdae683757
Turn WatcherInner
into Watcher
...
As `Watcher` really adds nothing.
2024-04-13 23:09:16 +02:00
Sebastian Thiel
1476ff01ee
Avoid managing every piece of the watcher, only manage what's currently needed
2024-04-13 23:09:16 +02:00
Sebastian Thiel
efe03a9b3a
Use the new dispatcher and make sure everything still works
2024-04-13 23:09:16 +02:00
Sebastian Thiel
954d100d95
simplify dispatcher around the idea of a single channel
...
That way, all objects go away and it will be nothing more than a task
around a channel.
2024-04-13 23:09:16 +02:00