Kiril Videlov
cea0e219a5
Remove unnecessary deps from gitbutler-repository
2024-10-22 13:55:50 +02:00
Kiril Videlov
4ef288f60d
Move RepoActionsExt out of gitbutler-repository
...
This is a higher level trait with lots of dependencies
2024-10-22 13:44:04 +02:00
Kiril Videlov
cb7c4ea486
refactor stack api
...
Make it not depend on RepoActionsExt
2024-10-22 13:29:37 +02:00
ndom91
dd098f1e53
fix: remove rust validation for branches already pushed
2024-10-22 13:25:48 +02:00
Kiril Videlov
56a4a4ac0d
Adding an extra dedup step to absolutely prevent duplication
...
Duplicate keys crashes the UI
2024-10-22 02:02:12 +02:00
Kiril Videlov
adbc69a80d
Fix - remove the assumption that a stack can only have one commit with a given change id
...
Having a change id being duplicated is a bad state but we must be able to handle it
2024-10-22 01:57:58 +02:00
Kiril Videlov
c843e5d7ec
add large file protection for the UI on commits
...
If there are large non-binary files, it can lock up the UI. Add the same handling that we already apply for the uncommitted files
2024-10-21 19:09:38 +02:00
Kiril Videlov
6ed54349d0
Fix for branches incorrectly deleted
...
If a branch is being "unapplied' due to conflicts - dont delete the state
2024-10-21 14:42:24 +02:00
estib
6a64db6c29
PR details modal: Allow user to choose the PR template
...
User can select the PR template to use for each individual PR
Also:
Improve the tests of the forge review crate
2024-10-18 18:22:19 +02:00
Kiril Videlov
2630dbbc1e
fix a bug in marking commits as integrated
...
Match the implementation of the legacy commits, which check only up to the first integrated commit
2024-10-20 19:08:40 +02:00
Kiril Videlov
de9dbbd34f
fix - when generating initials, handle accents etc correctly
...
The branch name needs to be ascii
2024-10-20 16:39:35 +02:00
Kiril Videlov
fc51c61bf0
refactor - move branch generation to a function
2024-10-20 12:48:07 +02:00
Kiril Videlov
d2d31644a1
remove unnecessary test
2024-10-20 00:32:06 +02:00
Kiril Videlov
dd93fc16db
fixes a bug in handling the remote name
...
Seems like projects that were created long time ago do not have the push_remote_name field set up. Add correct handling for all those situations
2024-10-20 00:22:57 +02:00
ndom91
101bb6be40
feat: add VSCode Insiders to "open in editor" options
2024-10-18 17:41:02 +02:00
estib
93786f931d
Factor out the 'read PR template' content logic
...
Move the function that reads the PR template content to the `gitbutler-forge` crate.
The method will also verify that that's a valid PR template path for the project's forge type
2024-10-18 15:05:36 +02:00
estib
4ee01031f6
gitbulter-forge crate
...
Create a centralized crate for forge actions that is provider agnostic.
Move the logic behind fetching the PR templates to it.
2024-10-17 18:15:08 +02:00
Kiril Videlov
1dda7c4455
Templated branch names - prefix with user initials
2024-10-18 14:08:20 +02:00
ndom91
ce3ac1a079
feat: update default stack name to 'Lane'
2024-10-18 13:57:33 +02:00
Kiril Videlov
74e35f86cf
fix - stack / requires force
...
Toggle on 'requires force push' if there are upstream only patches (so that they can be overriden)
2024-10-18 12:01:46 +02:00
Kiril Videlov
de6de23155
Stack api - small refactor
...
Remove duplications, typos etc
2024-10-17 20:03:13 +02:00
Kiril Videlov
6b3f80e157
Move a series converion function in branch-actions to separate module
2024-10-17 18:56:48 +02:00
Kiril Videlov
0aac619791
Stack: fix upstream commit listing
2024-10-17 18:51:25 +02:00
Caleb Owens
92c1188759
Patch stack creation
2024-10-17 12:59:14 +02:00
Caleb Owens
2c00d5f869
Listing series
2024-10-16 17:49:55 +02:00
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
98c537f5ec
stack: improvve computing of upstream only commits
...
It is necessary to compare against commits from either side of merge commits
2024-10-16 20:22:37 +02:00
Kiril Videlov
64fd3b893d
Merge pull request #5165 from Byron/fixup-5089
...
Some improvements on top of #5089
2024-10-16 19:19:46 +02:00
Kiril Videlov
d8f10e1513
fix comment on a test assertion
2024-10-16 18:55:06 +02:00
Kiril Videlov
64d2641e70
fix an missed call site
2024-10-16 18:46:01 +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
5cd9d77fec
Merge pull request #5173 from gitbutlerapp/fix-issues-with-series-listing
...
Stack - correctly flag remote commits when no changeid
2024-10-16 17:34:30 +02:00
Kiril Videlov
b3313fb60b
make it compile lol
2024-10-16 17:27:21 +02:00
Caleb Owens
10b7ab9471
Fix issue where incoming commit headers were caried into merge commit headers
2024-10-16 16:58:33 +02:00
Sebastian Thiel
f7d5380687
Some improvements on top of #5089
...
The PR was merged earlier to not hold it after a passed review,
yet I personally feel strongly enough about the backend portions
to give it another round of polish.
2024-10-16 16:35:06 +02:00
Kiril Videlov
055a653979
Stack - correctly flag remote commits when no changeid
2024-10-16 15:53:56 +02:00
Sebastian Thiel
22f0e4ab36
Merge pull request #5089 from Zamoca42/feat/parse-binary-file
...
feat: Parse & display binary files
2024-10-16 11:36:28 +02:00
Ali Houssain Sareini
caf1b92b89
Merge branch 'master' into master
2024-10-15 18:33:23 -04:00
Kiril Videlov
55b91a484f
GC branch entries on fetch
2024-10-15 16:22:10 +02:00
Kiril Videlov
5b39495062
implement GC for branch entries
...
Garbage collects branches that are not in the workspace and hold no changes:
1. They do not have a WIP commit
2. They have no regular commits
2024-10-15 16:21:40 +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
Kiril Videlov
be24f64c12
Stack - improved automatic reference names
...
Now the template for new references is "branch-n"
2024-10-15 16:40:51 +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
Chooooooo
f178c4fed4
Update read_file_from_workspace logic
...
- Refactor `read_file_from_workspace` to separate `HEAD^{tree}` lookup logic
- Add new `read_file_from_tree` function to handle both `HEAD^{tree}` and specific commit lookups
- Add edge case handling for querying files from a specific commit in `read_file_from_workspace`
- Add conditions to handle modified or deleted files in worktree
- Improve file status handling with new `FileStatus` enum
- Update `FileInfo` struct to include file status information
2024-10-15 21:26:39 +09:00
Ali Houssain Sareini
4daeb53dba
feat: Add support for the 'zed' URL scheme
2024-10-14 19:36:51 -04: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
Chooooooo
e789eb1a55
Add preview support for untracked binary files
2024-10-15 03:31:28 +09:00
Chooooo
b4c84fdfd8
Merge branch 'master' into feat/parse-binary-file
2024-10-15 00:07:28 +09:00
Kiril Videlov
e8732f72e2
initialize stack with the same reference as the legacy reference
2024-10-14 16:29:38 +02:00
Caleb Owens
94ff87a72c
Pass --no-verify to git push
2024-10-14 18:27:58 +02:00
Sebastian Thiel
0be8710752
Merge pull request #5111 from Byron/fix-5096
...
Probably fix #5096
2024-10-14 14:03:31 +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
Kiril Videlov
6b6fc9b016
Merge pull request #5118 from navtoj/master
...
fix: "The `Shell` module is not enabled"
2024-10-14 11:09:47 +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
Navtoj Chahal
1e59bb412c
enable opening URLs with the default browser
2024-10-13 19:44:26 -07: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
Kiril Videlov
ca6f3fd055
remove out of date todo
2024-10-11 22:57:52 +02:00
Kiril Videlov
18286a2142
Stack - adds a method to update the target commit with another in the stack
...
This is useful when a commit is destroyed (uncommit, squash, move)
2024-10-11 22:55:35 +02:00
Sebastian Thiel
d63babff0a
Assure that Project::path
can be compared reasonably with other paths ( #5096 )
...
When testing paths for prefix-matches it's important they are all normalized in
the same fashion.
`canonicalize()` is very particular about canonicalizing Windows paths, which
makes it easy for these paths to not be compatible to other absolute-looking
paths.
The difficulty here is to get the right trade-off between performance and
safety, e.g. we wouldn't want these canonicalized Windows paths to be used
anywhere as they are very uncommon (and don't even work everywhere).
2024-10-11 21:59:51 +02:00
Sebastian Thiel
b58a3f6dc3
Assure tests don't assume the default branch is set to master
globally.
...
Unfortunately, with anything `git2`, it's impossible (or unknown) to
prevent it from picking up the users configuration, hence tests aren't
isolated.
This change alleviates the worst results of this which at least makes
the tests run in my particular setup.
2024-10-11 21:59:48 +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
Sebastian Thiel
4420f5d6be
Do not allow folders without a .git
directory to be added as project ( #5099 )
2024-10-11 07:53:05 +02:00
Sebastian Thiel
21b463982c
reproduce #5099 , adding a submodule as project fails ( #5099 )
2024-10-11 07:34:36 +02:00
Sebastian Thiel
304f92bf70
Use new 'self-contained' style for integration tests
2024-10-11 07:18:28 +02:00
Chooooooo
3c9eb56a37
Add parsing for binary files
2024-10-10 19:04:36 +09:00
Esteban Vega
e28a4b697c
Merge pull request #5069 from gitbutlerapp/user-mail-is-optional
2024-10-09 22:50:00 +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
estib
8860622ff4
User: Make email optional
...
When authenticating with some IdPs, email doesn't get shared.
In that case, trying to authenticate would just throw a Rust-end error to the users.
This fixes that
2024-10-09 16:43:00 +02:00
Caleb Owens
82b58b6875
Make edit mode fantastic
2024-10-09 15:27:20 +02:00
Kiril Videlov
87a4c61b9f
Consistent setting of stack head updating the series
2024-10-08 22:25:19 +02:00
Kiril Videlov
915acd6afb
Fixes a bug when validating stack target commit
2024-10-08 22:24:34 +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
f172855c61
Adds a new
method to StackActions
2024-10-08 16:12:21 +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
f6d8bbc663
remove unused type
2024-10-08 16:03:22 +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