Mattias Granlund
8a741bcf2e
Delete entry from .toml file when branch is integrated
...
- virtual_branches.toml file was full of old entries
2024-08-22 13:46:55 +01:00
Sebastian Thiel
fcafaec2be
process merge-bases in the background
...
This way, only the first branch has to wait, all further branches will
likely have their merge-base already computed then.
2024-08-21 20:24:22 +02:00
Sebastian Thiel
bdd109047e
use latest gix
APIs for more convenience and increased readability.
2024-08-21 19:28:12 +02:00
Sebastian Thiel
e78ef9b115
enable max performance to be competitive in object database access.
...
This is very relevant for tree-diffing performance, and more could be tuned
here like pack-cache sizes and object cache sizes.
2024-08-21 19:28:12 +02:00
Sebastian Thiel
66c747e611
somewhat fix the ODB performance bottleneck with better caching.
2024-08-21 19:28:12 +02:00
Sebastian Thiel
a2382bde74
Use gix
to find branchs and get the local tracking branch
2024-08-21 19:28:12 +02:00
Sebastian Thiel
29ecbff318
Use gix
for tree-tree-diff
2024-08-21 19:28:12 +02:00
Sebastian Thiel
0db0f1a86a
Use gix
for simple ref-walk that won't go past the merge-base.
2024-08-21 19:28:12 +02:00
Sebastian Thiel
db600b48f9
add benchmark just for revwalking
2024-08-21 19:28:11 +02:00
Sebastian Thiel
42e4ab44f9
Make it more obvious where gitoxide
repositories are used.
2024-08-21 19:28:11 +02:00
Sebastian Thiel
7362bab7aa
Assure we can use different merge bases when showing branch details.
...
Alternatively, correct the assumption that there is a difference.
2024-08-21 19:28:11 +02:00
Sebastian Thiel
07dc9efe02
add tests for get_branch_listing_details()
2024-08-21 19:28:11 +02:00
Sebastian Thiel
e26bf2f54a
add benchmarks for branch details
2024-08-21 19:28:09 +02:00
Sebastian Thiel
96e0d3e83f
add --trace
to enable tracing
...
This is useful to get simple performance metrics.
2024-08-21 19:23:42 +02:00
Sebastian Thiel
77cbc50a68
branch listing and branch details for the CLI
2024-08-21 19:23:42 +02:00
Sebastian Thiel
d1fdcde139
minor refactor
2024-08-21 19:23:42 +02:00
Mattias Granlund
acf902c2e6
Fix applied -> in_workspace performance issue
...
- loop was taking > 1s for me
- my 8 branches (2 in workspace) were constantly being saved
2024-08-21 16:11:26 +01:00
Caleb Owens
7ab7731a31
Add edit mode actions
...
More edit mode
2024-08-19 11:03:51 +02:00
Mattias Granlund
4fe8b6860f
Fix branch name deduplication
...
- do not include name of branch being updated when deduping
2024-08-16 15:16:40 +02:00
Sebastian Thiel
b92407a5df
branch-listing benchmarks now work again
...
They type system is more strict now, rejecting an invalid branch name outright.
2024-08-09 21:53:42 +02:00
Kiril Videlov
d635f72269
i dont trust the old Refname implementation
...
So not using it for deletion here
2024-08-09 15:59:32 +02:00
Kiril Videlov
e295da03a1
adds a delete local branch command
...
This allows for deleting local branches and any associated virtual branches, so long as they have been unapplied first
2024-08-09 15:29:08 +02:00
Sebastian Thiel
de2989f352
Don't use gix
built-in serialization as it will leave BString as sequence of numbers.
...
Instead, we need it to be a string, even if lossy.
2024-08-09 13:12:36 +02:00
Sebastian Thiel
acbd42fce3
Revert "remove unnecessary BString-related serde functions."
...
This reverts commit 3043f099b7
.
We actually need this - me removing it just means it wasn't properly
documented and clarified in the type-system as to why this is needed.
2024-08-09 10:52:05 +02:00
Sebastian Thiel
4c76e2a6ee
Revert "Revert "Merge pull request #4652 from gitbutlerapp/git2-to-gix""
...
This reverts commit 88496e6219
.
2024-08-09 10:30:52 +02:00
Kiril Videlov
88496e6219
Revert "Merge pull request #4652 from gitbutlerapp/git2-to-gix"
...
This reverts commit ae8b05ae70
, reversing
changes made to 4d9b6a4a93
.
2024-08-09 10:18:51 +02:00
Sebastian Thiel
6720e987fe
Use gix::refs::PartialName
as even stronger guarantee for what's in there
2024-08-08 21:04:09 +02:00
Sebastian Thiel
712ce582cb
Use BranchIdentity
type instead of given_name()
.
...
This is a change in perception, as `given_name()` was the name of a virtual-branch,
which is also used to correlate other similarly named branches.
Thus, it's now more than just that, and for lack of a better word it's called
the 'identity' of a branch.
It's something very specific and shouldn't accidentally be used wrongly, hence
the strong typing.
2024-08-08 20:53:15 +02:00
Sebastian Thiel
5376a8b012
Author name uses BString to avoid degeneration
2024-08-08 20:53:14 +02:00
Sebastian Thiel
3df2da6de5
Use gix::remote::Name
for type-safety.
2024-08-08 20:53:14 +02:00
Sebastian Thiel
3043f099b7
remove unnecessary BString-related serde functions.
...
They are supported when the respective bstring feature is used.
2024-08-08 17:25:18 +02:00
Sebastian Thiel
8ed90644a1
refactor serde crate to avoid name duplication
2024-08-08 16:59:38 +02:00
Sebastian Thiel
17850bd210
Use gix
for branch listing
2024-08-07 20:21:29 +02:00
Sebastian Thiel
e42fcd4643
add benchmark for branch-listing
2024-08-07 20:10:02 +02:00
Caleb Owens
b36c85b211
feat: Update merge base comparison for branch listing
...
Improves branch listing accuracy by adjusting the merge base
comparison logic. For virtual branches in the workspace, uses the
default target SHA. For others, uses the head commit of the default
branch's upstream. This change ensures more precise branch
comparisons, especially for virtual branches.
2024-08-06 10:24:44 +02:00
Caleb Owens
7b008a4a54
feat: filter out virtual branches without local or remote
2024-08-05 22:09:26 +02:00
Sebastian Thiel
e8cc7f9f03
make the notion of identity
typesafe.
2024-08-05 20:01:00 +02:00
Caleb Owens
c35787a848
fix rust tests
2024-08-05 14:17:46 +02:00
Caleb Owens
1e342de03a
fix merge
2024-08-05 11:45:45 +02:00
Caleb Owens
0b31743a2e
mergey merge
2024-08-05 11:43:10 +02:00
Caleb Owens
aec1bda197
stuff
2024-08-05 11:37:39 +02:00
dependabot[bot]
c9c4630087
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 |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.62` | `1.0.63` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.38.0` | `1.39.2` |
| [console-subscriber](https://github.com/tokio-rs/console ) | `0.3.0` | `0.4.0` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.120` | `1.0.121` |
| [assert_cmd](https://github.com/assert-rs/assert_cmd ) | `2.0.14` | `2.0.15` |
| [clap](https://github.com/clap-rs/clap ) | `4.5.9` | `4.5.13` |
| [bstr](https://github.com/BurntSushi/bstr ) | `1.9.1` | `1.10.0` |
| [toml](https://github.com/toml-rs/toml ) | `0.8.14` | `0.8.15` |
Updates `thiserror` from 1.0.62 to 1.0.63
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63 )
Updates `tokio` from 1.38.0 to 1.39.2
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.39.2 )
Updates `console-subscriber` from 0.3.0 to 0.4.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.3.0...console-subscriber-v0.4.0 )
Updates `serde_json` from 1.0.120 to 1.0.121
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.120...v1.0.121 )
Updates `assert_cmd` from 2.0.14 to 2.0.15
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v2.0.14...v2.0.15 )
Updates `clap` from 4.5.9 to 4.5.13
- [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.9...v4.5.13 )
Updates `bstr` from 1.9.1 to 1.10.0
- [Commits](https://github.com/BurntSushi/bstr/compare/1.9.1...1.10.0 )
Updates `toml` from 0.8.14 to 0.8.15
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.14...toml-v0.8.15 )
---
updated-dependencies:
- 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: console-subscriber
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: assert_cmd
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: bstr
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
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 19:45:06 +00:00
Caleb Owens
00b778638a
Demoing conflict resolution
2024-08-01 18:09:23 +02:00
Sebastian Thiel
949ac1698d
add more tests for a deeper understanding on the graph traversal.
2024-08-01 16:25:03 +02:00
Sebastian Thiel
d0e10ff570
make it possible to show remotes for virtual branches that are targets, too.
2024-08-01 15:34:42 +02:00
Sebastian Thiel
e6b00b5e0e
more tests and refactors for branch-listing
2024-08-01 15:21:30 +02:00
Caleb Owens
5450ef15a1
mergey merge
2024-08-01 14:14:40 +02:00
Sebastian Thiel
b7c38e4f33
fix assumption about branch identity
...
It's possible for virtual branches to have the same 'identity' as
the target branch, yet they should be listed.
2024-08-01 09:24:35 +02:00
Sebastian Thiel
2d82b6e038
more tests specific to how branches are discovered
2024-07-31 19:44:00 +02:00
Sebastian Thiel
182381dd79
assure normalization will always provide valid ref-names, or fail.
...
Otherwise, it's possible to run into `git2` errors, which are
more 'indirect'.
2024-07-31 18:52:01 +02:00