Kiril Videlov
dd6d62cf42
Add tests for integrate_upstream_commits_for_series assuring same behavior
2024-10-17 11:30:07 +02:00
Kiril Videlov
169fe207ce
Reimplement integrate_upstream_commits_for_series to do a two-pass rebase
2024-10-17 11:29:43 +02:00
Kiril Videlov
6a056f9ad7
refactor integrate_upstream_commits_for_series
2024-10-16 22:09:59 +02:00
Kiril Videlov
a2506177f1
Use new integrate upstream in stacked up
2024-10-16 12:22:14 +02:00
Kiril Videlov
b6ec442a4a
Implement integrate upstream commits for the stacked flow
...
refactor integrate upstream code for the stacked flow
fix semantics
2024-10-16 12:03:20 +02:00
Kiril Videlov
c5f20160bc
Stack - optimize getting commit by change id
...
Pass the merge base instead of computing it every time
refactor stack
2024-10-16 20:55:50 +02:00
Kiril Videlov
5fbf242f86
Update virtual.rs
2024-10-16 20:25:08 +02:00
Kiril Videlov
d8f10e1513
fix comment on a test assertion
2024-10-16 18:55:06 +02:00
Kiril Videlov
99ebced634
fix correct test expectations
2024-10-16 18:36:12 +02:00
Kiril Videlov
3bd4428f35
When revwalking only get the commits from the first parent
...
Also adding an option for getting all
2024-10-16 18:28:32 +02:00
Kiril Videlov
055a653979
Stack - correctly flag remote commits when no changeid
2024-10-16 15:53:56 +02:00
Kiril Videlov
55b91a484f
GC branch entries on fetch
2024-10-15 16:22:10 +02:00
Kiril Videlov
a20c2304df
unapply_without_saving
of a (v)branch now also delete persisted state
2024-10-15 15:03:43 +02:00
estib
44c376e48d
fix: Move any commit from branch to branch
...
Move any commit won't duplicate the commit in both virtual branches.
Also:
- Also add tests to catch this
2024-10-15 14:28:56 +02:00
Kiril Videlov
d168588596
change default stack series reference to match the virtual branch legacy one if set
...
This is only applicable during the migration period - when a virtual branch has been pushed, and therefore there is a reference set. If that is the case, this will make the default series reference match that reference name
2024-10-14 20:49:49 +02:00
Kiril Videlov
3a833261e0
Merge pull request #5121 from gitbutlerapp/handle-undo-commit
...
Stack - handle reorder correctly
2024-10-14 11:27:21 +02:00
Esteban Vega
49a88430a2
Merge pull request #5048 from Pranav2612000/feat/4889-allow-moving-any-commit-from-stack-to-lane
...
[#4889 ] feat: allow moving any commit from a stack into another lane
2024-10-14 09:10:23 +02:00
Kiril Videlov
77a03917e5
Stack - handle reorder correctly
2024-10-14 01:41:24 +02:00
Kiril Videlov
08a00a93b3
stack - replace head on undo commit
2024-10-13 23:59:30 +02:00
Sebastian Thiel
44a6125c3c
Merge pull request #5100 from Byron/fix-5099
...
fix 5099
2024-10-11 20:53:36 +02:00
Sebastian Thiel
9175e60e60
re-enable now working test thanks to gitoxide
fix
2024-10-11 18:59:38 +02:00
estib
c9f2f479e5
Move commits: Renamings, copy changes and a small fix
...
- Update the variable names so that they convey the right things that we're moving around.
- Correct the thrown error messages
- Append the source commit to the list of commits we're testing against the source commit diffs.
2024-10-11 16:50:49 +02:00
estib
f71187ed05
feat: allow moving any commit from a stack into another lane
...
Rebasing fixes
2024-10-11 15:06:55 +02:00
Mattias Granlund
9499bde372
Ensure stack initialized when re-applying branch
...
- set_stack_head could throw without it
- nolith reported this breakage on discord
2024-10-11 10:53:23 +02:00
Kiril Videlov
bdb8f50ce8
Stack: fixes an issue with displaying upstream commits
2024-10-09 22:38:17 +02:00
Kiril Videlov
f4a935c600
Stack - correctly set the requires_force atribute
...
If any commit from any series has divergence, forceful push is required
2024-10-09 21:13:38 +02:00
Caleb Owens
5071cc40ff
LIst conflicted files in commit files list
2024-10-09 20:21:57 +02:00
Kiril Videlov
3978476b78
Add an extra field remote_commit_id
on the API type VirtualBranchCommit
...
This makes it possibe (and easy) for the UI to determine if there is another (different) commit on the remote for the same patch
2024-10-09 18:15:10 +02:00
Kiril Videlov
87a4c61b9f
Consistent setting of stack head updating the series
2024-10-08 22:25:19 +02:00
Kiril Videlov
34ca1f4a65
Merge master
into refactor Branch and Stack
2024-10-08 19:40:17 +02:00
Kiril Videlov
cfafc8d7b5
Make all places that create Stack also initialize it
2024-10-08 16:43:42 +02:00
Kiril Videlov
48bbe13d56
Rename StackExt.new to create
2024-10-08 16:37:07 +02:00
Kiril Videlov
570c974544
Rename StackActions to StackExt
...
Closer to rust conventions
2024-10-08 16:32:18 +02:00
Kiril Videlov
ce9b136185
Rename Stack constructor function to new_uninitialized
...
This describes it more accurately
2024-10-08 16:05:23 +02:00
Kiril Videlov
d05d962cf8
Rename Branch to Stack
2024-10-08 15:59:27 +02:00
Caleb Owens
99145f4aa4
Redo branch upstream integration
2024-10-08 15:49:58 +02:00
Kiril Videlov
9e9f3255a8
Remove some types out of the stack crate
...
Seems i can get away without adding it
2024-10-08 15:44:59 +02:00
Kiril Videlov
7ec59f8489
extract the Branch types to crate gitbutler-stack
2024-10-08 15:27:16 +02:00
Pranav2612000
1bb390a573
refactor: rename check_source_lock_to_ancestors to check_source_lock_to_commits
2024-10-08 18:30:22 +05:30
Kiril Videlov
d78ebbe176
rename crate gitbutler-stack to gitbutler-stack-api
...
This is needed to free up the name gitbutler-stack
2024-10-08 14:53:23 +02:00
Kiril Videlov
5b7109e8ee
refactor(Branch): implement set_head() and make field private
...
This allows us to control the head setting and update the stack `heads` field accordingly
2024-10-08 12:21:57 +02:00
Kiril Videlov
cb2c0d458e
refactor(Branch): implement a head() method
...
Moving the access to head behind a method so that we can eventually migrate to the `heads` field
2024-10-08 12:23:38 +02:00
Caleb Owens
8f9fd0cbe7
Extract branch_upstream_integration into it's own file
2024-10-07 18:02:21 +02:00
Caleb Owens
45fbb1af76
Remove old update_base_branch code
2024-10-07 17:46:28 +02:00
Caleb Owens
531672876f
Remove edit mode flag from backend
2024-10-07 17:08:32 +02:00
Caleb Owens
f47fdd703b
Introduce merge_base_octopussy
2024-10-02 14:59:11 +02:00
Caleb Owens
2cb1358ac0
Use common primatives, and make sure conflicted trees are handled correctly
2024-10-07 16:51:24 +02:00
Caleb Owens
82406810f0
Extract tree updating into its own tested function
2024-10-07 16:10:34 +02:00
Caleb Owens
8c01244925
Fix upstream integration when there are no new branches
...
This is important as it will otherwise look like you've got the inverse diff in your uncommited changes.
2024-10-07 11:01:30 +02:00
Kiril Videlov
2b45293aee
Stacking: fix upstream handling
...
- Correctly detect commits that have been pushed
- Return the list of upstream only commits on the list_virtual_branches response
2024-10-04 16:50:15 -07:00