Caleb Owens
6d52977202
Remove worktree_path and use workdir
function in create_wd_tree
2024-09-30 12:27:34 +02:00
Caleb Owens
e4ecddc690
Extract create_wd_tree test into test directory
2024-09-30 12:26:31 +02:00
Caleb Owens
06af1c5fe9
Ensure that the index indeed remains unchanged
2024-09-29 23:23:50 +02:00
Caleb Owens
102b941d3e
Use new git2 implementation
2024-09-29 23:18:07 +02:00
Caleb Owens
47a4fc03c7
Update testing framework
2024-09-29 20:23:23 +02:00
Caleb Owens
7f348d8a6d
Add tests for reordering commits
2024-09-28 17:50:32 +02:00
Caleb Owens
31242dbe2b
Add helper function for matching trees, and start testing rebasing.
...
Basic rebasing tests
2024-09-26 14:42:14 +02:00
Caleb Owens
46fa53a878
Fix merge commit unconflicted state
...
more tests
2024-09-25 23:37:37 +02:00
Caleb Owens
8a84753e92
Merge branch 'master' into Testing-rebase
2024-09-24 20:00:38 +02:00
Caleb Owens
f74f2dcf26
More tests!
2024-09-24 19:52:21 +02:00
Kiril Videlov
86460fb675
Merge pull request #4964 from Byron/commit-with-headers
...
`gitoxide` for commit with headers
2024-09-24 18:47:29 +02:00
Caleb Owens
bbbf81c4c1
Start to introduce index resolution tests
2024-09-24 17:01:38 +02:00
Sebastian Thiel
fe7d5d92e7
add crate to keep gitoxide conversions to prevent duplication
2024-09-24 15:54:07 +02:00
Caleb Owens
a395dab091
Refactor some of rebase.rs
2024-09-24 13:20:02 +02:00
Sebastian Thiel
d16656816d
Use gix
to create signed commits with multiple headers.
2024-09-24 13:02:34 +02:00
Sebastian Thiel
9f6c01c5ab
make tests work under more conditions
...
Currently tests rely to be run globally so `branch-actions` can set
the required feature flags.
Now more crates that need it will set it so that their tests can be
run individually.
2024-09-24 11:01:13 +02:00
Nico Domino
992496f6a5
fix: protect read file from path traversal ( #4943 )
2024-09-22 17:12:45 +00:00
Caleb Owens
224c03528b
Improve index resolution
2024-09-18 11:45:38 +02:00
Caleb Owens
d995a04b31
Correct merge commit logic
2024-09-13 12:57:46 +02:00
Caleb Owens
e626a6f6ba
Resolve creation/deletion conflicts
2024-09-13 12:32:01 +02:00
Sebastian Thiel
31626b726b
Edit trees directly when running create_wd_tree()
to bypass the index.
2024-09-14 18:48:01 +02:00
Caleb Owens
6e7aefd5c3
Merge commiting
2024-09-11 14:47:36 +02:00
Caleb Owens
191686ec4d
Ahhh, don't loose shit
2024-09-11 11:23:20 +02:00
Kiril Videlov
3899975d6c
remove useless credentials helper struct
2024-09-06 11:03:57 +02:00
Caleb Owens
e4834dbba9
Fancy fast forward
2024-09-04 14:39:38 +03:00
Mattias Granlund
0db82ea38c
Replace all relevant occurrences of integration with workspace
2024-09-02 20:53:19 +03:00
Mattias Granlund
5f9c2e5832
Rename gitbutler/integration -> gitbutler/workspace
2024-09-02 20:53:19 +03:00
Kiril Videlov
2c7773a6cd
Merge pull request #4793 from Byron/git2-to-gix
...
performance improvements and bug fixes
2024-08-30 12:53:26 +02:00
Caleb Owens
0802d1c477
Resolve merge in less stupid manner
2024-08-30 11:05:20 +02:00
Sebastian Thiel
6a4849d090
refactor: avoid borrowed git2::Oid
as it's a copy type.
...
Usually this makes the affected code simpler.
2024-08-30 07:15:46 +02:00
Sebastian Thiel
c81b140790
Assure the most-recent workspace head is used when emitting changed files.
...
The reason for this is that now the outcome of this can be re-used in `list_virtual_branches`,
which is sensitive to seeing the latest vbranch state which is not a given.
Calculating it makes sure there is no mismatch, and probably "can't be wrong".
Also note that `head_commit()` is still kept around as it's the idea to eventually
use it more.
2024-08-30 07:15:40 +02:00
Sebastian Thiel
47b6d41a26
Merge pull request #4771 from Byron/git2-to-gix
...
list virtual branches performance
2024-08-29 09:50:35 +02:00
Sebastian Thiel
a0e236110a
refactor
...
- move `gix` repository extension to where it belongs more naturally.
- make sure that `get_wd_tree()` is named more closely to what it really
does, and use it in more places.
2024-08-28 22:05:25 +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
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
d386790930
resolve to our side
2024-08-27 14:00:56 +02:00
Caleb Owens
0b397d2368
Jiggle some code about
2024-08-27 13:05:28 +02:00
Caleb Owens
3fb5077c4a
Somethign somethign matchy matchy design
2024-08-27 13:05:27 +02:00
Kiril Videlov
cef701796d
update the create reference method to take change id
2024-08-26 20:49:01 +02:00
Caleb Owens
e463e2b2e9
Correct the tree side which we write
2024-08-26 19:34:44 +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
Caleb Owens
f6dae49a8d
Commits and another enum correction
2024-08-26 15:40:22 +02:00
Caleb Owens
3170042895
Merge pull request #4754 from gitbutlerapp/Use-correct-sides
...
Use the auto-resolution if the head is conflicted
2024-08-26 15:11:08 +02:00
Caleb Owens
ca0ece9d49
Use the auto-resolution if the head is conflicted
2024-08-26 15:05:36 +02:00
Sebastian Thiel
1520a4b7a3
make GPG related spawn failures even clearer ( #4750 )
...
This should help self-disagnose probelms aroung GPG not being found.
2024-08-25 09:18:33 +02:00
Kiril Videlov
4668a1ec3d
update create and update reference apis
...
No need to provide the change_id as it can be obtained from the commit itself
2024-08-23 14:32:31 +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
Kiril Videlov
aea72e8605
update any branch references during cherry rebase
2024-08-23 00:03:58 +02:00