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
Sebastian Thiel
a5bc727705
let integration commit also respect author and committer times.
2024-07-31 18:52:01 +02:00
Sebastian Thiel
76d687b55c
Respect author-date for setting up completely static commmit graphs
...
This updates to a yet-to-be-released version of `gix` to be able to
leverage full local-time support thanks to the usage of `jiff`.
This means we can now rely on the local `now()` that `gix` signatures
come with, which naturally respect environment variables that help
to make commits statically known.
For the running Tauri application this won't have an effect as it won't
inherit environment variables, but the CLI will be different in that regard.
2024-07-31 18:52:01 +02:00
Caleb Owens
09de80f6f0
Mergy merge
2024-07-31 13:11:02 +02:00
Mattias Granlund
b676115b11
Always create new commit in get_workspace_head
...
- so we can safely recreate the integration commit
2024-07-30 18:09:07 +01:00
Mattias Granlund
11f0063f18
Remove test cases that do not apply
...
To list virtual branches we should require a base branch to be set.
2024-07-30 18:09:07 +01:00
Mattias Granlund
1e518a3d78
Use octopus commit for creating gitbutler/integration
2024-07-30 18:09:07 +01:00
Caleb Owens
e53c11a477
introduce last commiter field, use jsdoc, add type transforms
2024-07-30 16:42:20 +02:00
Caleb Owens
2d61cae43a
Introduce operating modes
2024-07-29 13:19:38 +02:00
Caleb Owens
6f4a190464
project_repo -> ctx
2024-07-29 11:14:02 +02:00
Caleb Owens
21bad4f30f
repo -> repository
2024-07-29 11:13:25 +02:00
Caleb Owens
f4569ff4da
Yes Kiril, I know its an abrv., but its consistent with what Byron started
2024-07-29 10:46:17 +02:00
Caleb Owens
366ccfecdf
Rename ProjectRepository to CommandContext
2024-07-29 10:43:18 +02:00
Mattias Granlund
974e60aefc
Fix branch reordering
...
- move branches into their own div
- make only one update request
2024-07-29 01:07:06 +01:00
Kiril Videlov
9d04c08528
add branch listing details api
...
this allows us to paginate the expensive bit of the API, like getting the lines added / removed
2024-07-28 22:19:30 +02:00
Sebastian Thiel
39099ba41c
run the nightly cargo fmt
with pnpm fmt
...
This also optimizes imports/uses, which is done only occasionally.
2024-07-28 21:02:40 +02:00
Sebastian Thiel
9e236e3469
remove async
except for in gitbutler-git
...
The reason is that it's unclear if maybe it's there for a good reason,
and I don't want to break the complex code in there.
2024-07-28 20:47:35 +02:00