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
Sebastian Thiel
dd724f310d
Also debug-trace information on list_virtual_branches
calls.
...
This can be useful for those who seek extra information, and while it's
dominating refresh times.
2024-08-28 11:09:33 +02:00
Kiril Videlov
06f50b4531
Merge branch 'master' into branch-stacking-first-stab
2024-08-27 14:13:08 +02:00
Kiril Videlov
b943c35293
code review fixes
2024-08-27 14:05:27 +02:00
Caleb Owens
3fb5077c4a
Somethign somethign matchy matchy design
2024-08-27 13:05:27 +02:00
Caleb Owens
d2d3afbf2b
Added unstaged changes event
2024-08-27 13:05:07 +02:00
Sebastian Thiel
06edec70cb
reuse the commit-graph between runs
...
This time, it contains whole commits and only flags are reset
between runs. With this amount of re-use, it will manage
to rival `git2`.
2024-08-27 12:17:54 +02:00
Sebastian Thiel
b081a115c8
Offload commit-walk to the commit-thread
...
That way, it can leverage already held commit-objects, and be faster
in the absence of a commitgraph.
2024-08-27 09:20:07 +02:00
Kiril Videlov
4b5a8d14ef
add commands for pushing change references
2024-08-26 21:38:40 +02:00
Kiril Videlov
cef701796d
update the create reference method to take change id
2024-08-26 20:49:01 +02:00
Sebastian Thiel
82aa2d1760
use gix
powered merge-base for performance and reduced memory consumption
2024-08-26 19:35:09 +02:00
Kiril Videlov
66257fba2f
rename reference module to change_reference
2024-08-26 19:15:58 +02:00
Kiril Videlov
89d1186b06
refactor this to be a ChangeReference
...
it turns out that a reference to a change_id is all that we need
2024-08-26 17:02:38 +02:00
Kiril Videlov
2ddb032ebf
show relevant commit refs if feature is toggled
2024-08-23 21:03:44 +02:00
Kiril Videlov
33e7d7b269
adds the ability to create branch refs from the UI
2024-08-23 18:07:24 +02:00
Sebastian Thiel
7ee0520ffb
Use latest rev_walk()
based API.
...
It's a bit more intuitive than `id().ancestors()` when coming from `git2`.
2024-08-23 13:08:37 +02:00
Caleb Owens
ec7a38f538
Merge pull request #4717 from gitbutlerapp/Rebase-revolution
...
Rebase revolution
2024-08-22 18:28:49 +02:00
Caleb Owens
893b3fc499
Use a default variant on enum
2024-08-22 18:04:11 +02:00
Caleb Owens
c987629262
Add project specific setting and refactor
2024-08-22 17:57:03 +02:00
Caleb Owens
0603fd7457
Sure up behaviour with blank commits and reordering
2024-08-22 15:15:23 +02:00
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
ace6facb24
Getting behaviour locked in
2024-08-21 14:45:41 +02:00
Caleb Owens
e07b4b2d0d
Refactor some code
2024-08-20 10:51:34 +02:00
Caleb Owens
65fb462d64
Rebase revolution
...
Co-authored-by: Scott <schacon@gmail.com>
2024-08-19 18:10:28 +02: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
Kiril Videlov
74c8bce48d
add BranchReference type to the Branch persisted struct
...
This allows (virtual) branches to keep track of associated references
2024-08-10 21:35: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