Commit Graph

265 Commits

Author SHA1 Message Date
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
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
00a77d9327
move branch state into a separate crate 2024-07-07 21:26:07 +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
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
8e3601e855 Merge: resolve lockfile conflicts 2024-07-02 16:21:54 +02:00
Kiril Videlov
23503afd25
merge stuff 2024-07-02 15:05:56 +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
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
Kiril Videlov
4db2698cda
bump tauri minor version
this allows us to bundle RPM packages!
2024-07-02 10:48:47 +03:00
dependabot[bot]
34673ef938
Bump tauri-plugin-window-state from 5e3900e to 862c42a
Bumps [tauri-plugin-window-state](https://github.com/tauri-apps/plugins-workspace) from `5e3900e` to `862c42a`.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](5e3900e682...862c42a457)

---
updated-dependencies:
- dependency-name: tauri-plugin-window-state
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 15:42:06 +00:00
Kiril Videlov
b886ff84f1
refactor: Remove rusqlite dependency and related code. 2024-06-26 16:21:24 +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
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
Lukylix
2d7b7737be Askpass test 2024-06-21 22:49:19 +02:00
Lukylix
1d940c8204 Cargo.lock 2024-06-20 16:43:51 +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
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
1f22948296
downgrade mock-instant to get watcher tests to work 2024-06-01 21:24:57 +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
96dc9d2887
fix oplog-worktree merging 2024-05-29 17:58:54 +02:00
Sebastian Thiel
5cad4dabc8
upgrade to latest gix-glob to prevent choking on directories called .gitignore (#3876)
This is also effective for `.gitattributes` directories, making `gitoxide`
act just like Git.

Note that `gix-fs` is updated just for a potential Windows fix which probably
doesn't matter.
2024-05-28 22:04:10 +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
2ed708b298
remove chrono which was only used for 'now in milliseconds, relative to UNIX epoch' 2024-05-24 21:38:11 +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
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
Sebastian Thiel
7536431da9
upgrade gix to v0.63
It comes with various bugfixes and security improvements.
Admittedly, none of these are currently relevant for GitButler.

It's still a good idea to upgrade as `cargo deny` would have problems
with older versions due to the security advisories that were published
yesterday.
2024-05-23 09:40:05 +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
Ani Betts
fe35b1f65f
Import notify_debounce_full
We need to make some changes to notify_debounce_full and it seems like
the project is unmaintained, let's copy-paste some code
2024-05-15 20:27:25 +02:00
Ani Betts
1695ad5c53
Add dirs crate 2024-05-15 17:39:00 +02:00
Kiril Videlov
3e0914444f
remove unused crates in tauri 2024-05-12 04:19:19 +02:00
Kiril Videlov
0a12b3eac5
remove unused crates in core 2024-05-12 04:12:56 +02:00
Josh Junon
c564ccc7f7
add gitbutler_git::sign_commit() 2024-05-07 16:26:38 +02:00
Josh Junon
6afd680781
remove old changeset code 2024-05-07 07:03:34 +02:00
Pavel Laptev
043917ad45
Help window menu added 2024-05-05 21:40:06 +02:00
Kiril Videlov
9aee55c869
tiny cli for snapshots
this is a cli convinience tool for listing and restoring gitbutler snapshots even if the app can't start or if it's hung. of course this can be done with plain git, but this is more convinient

In the future we could add more functionality to it
2024-05-04 11:29:14 +02:00
Kiril Videlov
6c0f4c0946
Merge pull request #3652 from gitbutlerapp/dependabot/cargo/tauri-plugin-log-5e3900e
Bump tauri-plugin-log from `773b498` to `5e3900e`
2024-05-01 10:50:58 -07:00
dependabot[bot]
3733772b60
Bump tauri-plugin-log from 773b498 to 5e3900e
Bumps [tauri-plugin-log](https://github.com/tauri-apps/plugins-workspace) from `773b498` to `5e3900e`.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](773b498392...5e3900e682)

---
updated-dependencies:
- dependency-name: tauri-plugin-log
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 15:12:27 +00:00