Commit Graph

68 Commits

Author SHA1 Message Date
Kiril Videlov
5147638d74
avoids a gix panic with symbolic references 2024-07-24 23:29:57 +02:00
Kiril Videlov
187a3c22fe
create a tauri commant for the new branch listing 2024-07-24 22:51:14 +02:00
Kiril Videlov
d0545a219e
implement branch listings stats calculation 2024-07-24 15:53:49 +02:00
Kiril Videlov
bbd3aea3d0
reimplement with gitoxide 2024-07-23 17:33:28 +02:00
Kiril Videlov
4e4326d42b
remove unnecessary branch reference chack
We already had that info, use an enum variant to encode it
2024-07-23 15:48:37 +02:00
Kiril Videlov
a3b865a7f4
implement list branches 2024-07-23 10:45:16 +02:00
Kiril Videlov
0863e3b68d
New branch listing API - create types 2024-07-22 20:46:38 +02:00
Caleb Owens
2f54e51a33 Don't create unrequired wip commits 2024-07-25 15:25:51 +02:00
Caleb Owens
c1c5d88303 Specify the correct branch to be the upstream
asdf
2024-07-25 15:11:07 +02:00
Caleb Owens
2540642aaa Update context spelling 2024-07-25 14:20:20 +02:00
Caleb Owens
c6badd9f3e Update sidebar grouping of branches 2024-07-25 14:07:21 +02:00
Kiril Videlov
d8a1b4bc6b
get_workspace_head exit early when there are no applied branches
Avoids erroring out
2024-07-22 11:25:02 +02:00
Kiril Videlov
54ae0cf9e8
more possible mitigations for the "failed to apply" problemt related to merge conflicts 2024-07-21 22:30:24 +02:00
Kiril Videlov
581a793773
possible mitigation for the case when a conflicting branch is incorrectly not unapplied base update 2024-07-21 22:04:46 +02:00
Kiril Videlov
ea4f47da1b
get_applied_status returns VirtualBranchFiles instead of a tuple of path and hunks 2024-07-21 20:12:54 +02:00
Kiril Videlov
c25e48877b
move hunk related functions and structs to a module 2024-07-21 18:22:50 +02:00
Kiril Videlov
c2d135872a
rename files module to singular for consistency 2024-07-21 18:09:15 +02:00
Kiril Videlov
880ac13f21
move commit related functions and struct to a module 2024-07-21 18:06:52 +02:00
Kiril Videlov
6e27756098
move file related operations out of virtual.rs 2024-07-21 17:59:17 +02:00
Kiril Videlov
0f00f0425a
move tree writing out of virtual branch actions crate 2024-07-21 16:15:41 +02:00
Kiril Videlov
38e01c931c
rename tree writer functions to be actually descriptive of what they do 2024-07-21 15:59:30 +02:00
Kiril Videlov
9b9bd0b2e8
make virtual.rs functions operate on VirtualBranchHunk
Instead of the Hunk type from gitbutler_diff
2024-07-21 15:38:46 +02:00
Kiril Videlov
63863f9de5
Merge pull request #4452 from Byron/fix-4389
fix 4389
2024-07-20 23:12:07 +02:00
Kiril Videlov
8bfd897579
rename new_compute_locks function 2024-07-20 23:01:50 +02:00
Kiril Videlov
591552f625
get_applied_status now returns a more clear struct 2024-07-20 23:00:06 +02:00
Sebastian Thiel
af4c70fbbc
propagate fetch-errors explicitly to prevent silent failures (#4389)
However, some tuning might be desired to prevent showing anything if background-fetches fail,
which might be desirable after all as they don't seem to run with modals enabled.

Also perform minor refactors while at it.
2024-07-20 22:38:25 +02:00
Kiril Videlov
246dd9c379
move get_applied_status to separate module 2024-07-20 22:17:31 +02:00
Kiril Videlov
587915227d
remove redundant function get_status_by_branch 2024-07-20 22:01:46 +02:00
Kiril Videlov
27561fa7b8
simplify get_applied_status function signature 2024-07-20 21:57:45 +02:00
Kiril Videlov
84fda3838a
simplify get_workspace_head signature 2024-07-20 21:48:04 +02:00
Kiril Videlov
4125dcef3b
get remove vbranches list as function parameter 2024-07-20 21:44:20 +02:00
Kiril Videlov
e41ff19dc0
remove commented out code 2024-07-20 21:31:52 +02:00
Kiril Videlov
21e7953ac1
Merge pull request #4442 from Byron/optimize-one
optimize `is_commit_integrated()`
2024-07-20 13:35:49 +02:00
Kiril Videlov
5d56427f83
Adds error codes for commit failures
This will helps the UI better understand why a commit operation may have failed
2024-07-20 12:54:48 +02:00
Sebastian Thiel
ea37a387b4
optimize is_commit_integrated()
- do not repeatedly optain the same state, but cache it
- when doing a merge-check, keep temporary objects in memory only.
2024-07-19 11:14:19 +02:00
Sebastian Thiel
ddfd6b95eb
conflicts::mark() with newline check
Error early, instead of having dubious issues later.
2024-07-19 10:44:12 +02:00
Sebastian Thiel
0fbfa141b4
Don't touch disk once per path to conflict::resolve() multiple of them 2024-07-19 10:44:12 +02:00
Sebastian Thiel
5946c4ca9a
conflict::*()functions don't impose UTF-8 on paths
That way it's compatible to more kinds of paths, on more filesystem.
It assumes that the content of the `conflict` file is never moved
across platforms.
2024-07-19 10:44:12 +02:00
Kiril Videlov
6101c5c66f
move hunk and diff code to a separate crate, out of the branch one 2024-07-17 20:16:48 +02:00
Kiril Videlov
e6ccf764ee
supresss clippy warning about type complexity 2024-07-17 18:48:45 +02:00
Kiril Videlov
d5fffbd4ac
move HunkLock struct to branch actions crate 2024-07-17 18:30:23 +02:00
Kiril Videlov
5d74440d4c
remove lock attribute from diff hunk structs 2024-07-17 18:23:49 +02:00
Kiril Videlov
9eeb47b63f
get_applied_status returns locks 2024-07-17 12:01:50 +02:00
Kiril Videlov
3ad6b3fd10
Merge pull request #4409 from gitbutlerapp/dependabot/cargo/rust-updates-9e51e1549e
Bump the rust-updates group across 1 directory with 8 updates
2024-07-16 22:14:28 +02:00
Kiril Videlov
eed5643569
Merge pull request #4410 from Byron/lock-upgrades
clearer read-write separation
2024-07-16 22:14:16 +02:00
Caleb Owens
90d1465e5d
Fix up branches list 2024-07-16 19:39:46 +02:00
Sebastian Thiel
4526006bf9
Show that not all users of get_applied_status need write permissions...
...according to tests.
2024-07-16 17:33:53 +02:00
dependabot[bot]
cdafe5bc2c
Bump the rust-updates group across 1 directory with 8 updates
Bumps the rust-updates group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde) | `1.0.203` | `1.0.204` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.61` | `1.0.62` |
| [console-subscriber](https://github.com/tokio-rs/console) | `0.2.0` | `0.3.0` |
| [open](https://github.com/Byron/open-rs) | `5.2.0` | `5.3.0` |
| [sysinfo](https://github.com/GuillaumeGomez/sysinfo) | `0.30.12` | `0.30.13` |
| [rstest](https://github.com/la10736/rstest) | `0.20.0` | `0.21.0` |
| [clap](https://github.com/clap-rs/clap) | `4.5.8` | `4.5.9` |
| [diffy](https://github.com/bmwill/diffy) | `0.3.0` | `0.4.0` |



Updates `serde` from 1.0.203 to 1.0.204
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204)

Updates `thiserror` from 1.0.61 to 1.0.62
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.61...1.0.62)

Updates `console-subscriber` from 0.2.0 to 0.3.0
- [Release notes](https://github.com/tokio-rs/console/releases)
- [Changelog](https://github.com/tokio-rs/console/blob/main/release-plz.toml)
- [Commits](https://github.com/tokio-rs/console/compare/console-subscriber-v0.2.0...console-subscriber-v0.3.0)

Updates `open` from 5.2.0 to 5.3.0
- [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.2.0...v5.3.0)

Updates `sysinfo` from 0.30.12 to 0.30.13
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits/v0.30.13)

Updates `rstest` from 0.20.0 to 0.21.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.20.0...v0.21.0)

Updates `clap` from 4.5.8 to 4.5.9
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.8...v4.5.9)

Updates `diffy` from 0.3.0 to 0.4.0
- [Changelog](https://github.com/bmwill/diffy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bmwill/diffy/commits)

---
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: console-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: open
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: diffy
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-16 15:22:10 +00:00
Pavel Laptev
b888fbc834
normilize-branch-name-update (#4392)
* refactor: Normalized branch name handling

* Refactor: use only one normalize function (rust)

* Deletion: unused `normalizeBranchName` function

* Update lib.rs

* Changed test to reflect new functionality

---------

Co-authored-by: Caleb Owens <caleb@gitbutler.com>
2024-07-16 11:23:09 +02:00
Kiril Videlov
b9c26df9a1
indicate when a hunk is poisoned
This means that the hunk is 'locked/depends on' multiple branches, and because of this, it cannot be manipulated
2024-07-16 10:34:32 +02:00