Caleb Owens
a468ec7783
Added the tests
2024-10-01 17:12:46 +02:00
Caleb Owens
9cbebba5cf
Fix testcase for merge_vbranch_upstream_clean_rebase
2024-09-25 15:15:29 +02:00
Caleb Owens
cc8d3f4810
Did shit good
2024-09-16 16:42:23 +02:00
Caleb Owens
edd0cbe0e6
Rename unapplying
2024-09-13 16:58:42 +02:00
Kiril Videlov
310d4cf73a
fix a bug where deleting a vbranch fails to update state
2024-09-10 10:55:36 +02:00
Kiril Videlov
df4d6ac099
fixes a test that should be using writable fixture
2024-09-06 15:18:09 +02:00
Kiril Videlov
95e946b8a1
Remove unnecessary VirtualBranchActions struct
2024-09-06 14:12:14 +02:00
Mattias Granlund
260e81a94e
Use simpler function for asserting workspace is open.
2024-09-02 20:53:19 +03:00
Mattias Granlund
85ebc4ea78
Add test to ensure old integration branch doesn't throw
2024-09-02 20:53:19 +03:00
Mattias Granlund
0db82ea38c
Replace all relevant occurrences of integration with workspace
2024-09-02 20:53:19 +03:00
Mattias Granlund
9acab668cc
Fix broken test
...
- make use of integration commit title constant
2024-09-02 20:53:19 +03:00
Mattias Granlund
5f9c2e5832
Rename gitbutler/integration -> gitbutler/workspace
2024-09-02 20:53:19 +03:00
Sebastian Thiel
4d495cb3bc
Adjust integration check to also recognize by matching tree.
...
This is relevant when all commits are equal by tree, but seem changed
due to the added GitButler headers.
For added safety, we also compare by commit message, date and authors,
basically everything that isn't the headers.
2024-08-30 07:15:47 +02:00
Sebastian Thiel
36f23d529f
CLI with branch list-remotes
to list remote branches
2024-08-30 07:15:46 +02:00
Sebastian Thiel
7ce143954f
Do not dynamically calculate the head commit when listing virtual branches.
...
That way, the head is static which allows to re-use the worktree status across
multiple related calls.
Also, add a way to quickly get the `head_commit()` from a `git2::Repository`.
Note that this may cause breakage in the app, as now it will see the actual
head, not a computed one, but that should also help us to find places that
didn't properly update their state.
2024-08-28 21:16:43 +02:00
Sebastian Thiel
7e0878a14f
Use read-only worktree diff
...
The worktree diff is essentially a 'git status' with a given tree,
and that can be expressed with a diff of the workdir, the index and a tree.
This comes at the expense of not being able to control which file sizes are diffed.
2024-08-28 11:10:04 +02:00
Caleb Owens
ec7a38f538
Merge pull request #4717 from gitbutlerapp/Rebase-revolution
...
Rebase revolution
2024-08-22 18:28:49 +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
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
Caleb Owens
65fb462d64
Rebase revolution
...
Co-authored-by: Scott <schacon@gmail.com>
2024-08-19 18:10:28 +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
3df2da6de5
Use gix::remote::Name
for type-safety.
2024-08-08 20:53:14 +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
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
aec1bda197
stuff
2024-08-05 11:37:39 +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
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
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
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
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
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
Sebastian Thiel
7c371e5dd4
More tests to understand more about the current branch-listing.
...
This also needs the ability to create commits.
Also experiment with `async` tauri commands, but without actually making
them `async` - nothing actually is so why pretend?
Further, assure we get the correct author and committer which helps it
pick up the overridden author information when creating a commit.
2024-07-28 17:12:23 +02:00
Sebastian Thiel
282519eca5
add ability to create add projects in CLI and create vbranches
...
This allows actual GitButler setups and more complex tests, which
are also added here.
2024-07-28 10:45:18 +02:00
Sebastian Thiel
093795bd0b
first simple test for list_branches
and basic read-only test framework
2024-07-27 19:14:15 +02:00
Caleb Owens
7a6c7472a4
Always overwrite local references
2024-07-25 15:49:22 +02:00