Commit Graph

58 Commits

Author SHA1 Message Date
Nikita Galaiko
7c725a4a9f structured logging 2023-09-29 08:40:21 +02:00
Nikita Galaiko
fb4fb7ad06 improve sentry integration 2023-09-29 08:11:03 +02:00
Nikita Galaiko
8ac716e44b fix allowlist 2023-09-28 14:27:49 +02:00
Nikita Galaiko
80f43ffe32 chore: update build scripts to include separate build commands for nightly and development modes 2023-09-28 13:31:40 +02:00
Nikita Galaiko
e3415c0b6b fix: hunk equiality 2023-09-27 12:02:30 +02:00
Nikita Galaiko
61544a003c feat: add ability to unapply ownership for a hunk in the client
The changes in this commit add support for unapplying ownership for a hunk in the client. This allows users to discard changes made to a specific hunk and revert it back to its original state. The unapplyHunk method is added to the BranchController class, which sends a request to the server to unapply the ownership of the hunk. Upon successful unapplying, the virtual branch store is reloaded to reflect the changes.
2023-09-27 10:23:53 +02:00
Nikita Galaiko
114e4135ee
Merge pull request #1245 from gitbutlerapp/add-test-for-parse-ownership-tricky-file-name
fix: improve parsing of ownership ranges in FileOwnership struct
2023-09-26 14:23:15 +02:00
Nikita Galaiko
bbeadd0c8d fix: improve parsing of ownership ranges in FileOwnership struct
The parsing logic for ownership ranges in the `FileOwnership` struct has been improved. Previously, it split the input string by ':' and then by ',' to extract the file path and ranges. However, this approach had issues with file paths containing ':' characters. 

The updated logic now iterates over the parts of the input string in reverse order. If a part can be parsed as a `Hunk` (range), it is added to the `ranges` vector. Otherwise, it is considered as part of the file path and added to the `file_path_parts` vector. Finally, the `file_path_parts` vector is joined with ':' to form the file path.

This change ensures that file paths containing ':' characters are correctly parsed, allowing for more flexible and accurate parsing of ownership ranges.
2023-09-26 14:18:40 +02:00
Nikita Galaiko
c7a86f2039 unapply ownership api 2023-09-26 13:59:02 +02:00
Nikita Galaiko
3cdce00170 refactor: simplify checkout options in merge and apply branch functions
The merge_virtual_branch_upstream, apply_branch, and update_base_branch functions had repetitive code for checking out conflicts. This commit refactors the code to use a new CheckoutIndexBuilder struct, which simplifies the checkout options and makes the code more readable.
2023-09-26 10:52:46 +02:00
Nikita Galaiko
9f721e57d9 refactor: simplify code for checking out tree and add builder pattern for checkout options
The code for checking out a tree has been simplified by removing unnecessary code and using the builder pattern for checkout options. This makes the code more readable and maintainable.
2023-09-26 10:43:13 +02:00
Nikita Galaiko
18371227e8 refactor: simplify code for adding index entry and building working directory tree 2023-09-26 10:30:16 +02:00
Nikita Galaiko
065c00b011 reduce amount of opened file for locks 2023-09-25 10:36:51 +02:00
Scott Chacon
43beb0f5d5
fix: update merge_virtual_branch_upstream function to accept optional keys_controller parameter 2023-09-21 10:05:23 +02:00
Scott Chacon
3130d5fd1a merged upstream 2023-09-21 09:32:34 +02:00
Scott Chacon
c81b4e363f
merge test 2023-09-21 09:32:27 +02:00
Nikita Galaiko
34274bb3de explicitly define git url 2023-09-20 15:56:48 +02:00
Scott Chacon
aff8f261e2
add tests, remove other branches before merging, checkout conflict state 2023-09-20 15:25:12 +02:00
Nikita Galaiko
5c98330cc0 remove old commit page 2023-09-20 12:33:03 +02:00
Nikita Galaiko
c97b638f2f small fixes 2023-09-20 12:15:05 +02:00
Nikita Galaiko
1b520ca44d test 2023-09-20 11:56:16 +02:00
Nikita Galaiko
5f4b7acfc1 refactor: git commit signing 2023-09-20 11:53:59 +02:00
Scott Chacon
b2833e2549 feat: add merge_virtual_branch_upstream function to merge upstream changes into branch
The merge_virtual_branch_upstream function is added to merge the changes from the upstream branch into the current branch. This function checks if the project is in a conflicted state and if not, it proceeds with the merge. It finds the merge base between the upstream commit and the current branch's head commit, and then tries to merge the working directory tree with the remote tree. If the merge is successful, it commits the merge tree and updates the branch data.
2023-09-20 10:23:32 +02:00
Scott Chacon
d833643abf fix up stuff, remove debug, add test assert 2023-09-19 15:55:32 +02:00
Scott Chacon
c3adce8238 Merge remote-tracking branch 'origin/master' into sc-signing-2 2023-09-19 15:45:05 +02:00
Scott Chacon
e60c5e58d2 signing try number 2 2023-09-19 15:13:06 +02:00
Nikita Galaiko
60b4c63078 feat: refactor virtual branch module structure and add materialized view structs for presentation purposes
The virtual branch module structure has been refactored to improve code organization and readability. The module now consists of separate files for virtual branch, remote, and files related functionality.

Additionally, materialized view structs have been added for presentation purposes. These structs include `VirtualBranch`, `VirtualBranchCommit`, `VirtualBranchFile`, and `VirtualBranchHunk`. These structs provide a materialized view of the virtual branch data and are used for presentation purposes through the IPC.

This refactoring improves code maintainability and provides a clearer separation of concerns between the virtual branch module and the presentation layer.
2023-09-19 13:02:51 +02:00
Nikita Galaiko
160eae4e22 fix function call 2023-09-18 15:11:20 +02:00
Nikita Galaiko
7ca7dfd3e2 cargo fmt 2023-09-18 15:05:57 +02:00
Nikita Galaiko
e98f8bbf7b merged upstream 2023-09-18 15:04:15 +02:00
Nikita Galaiko
0caf0366e3 commit files fetching async 2023-09-18 15:04:09 +02:00
Nikita Galaiko
49d5295911 no error is branch is already applied 2023-09-18 13:59:50 +02:00
Nikita Galaiko
f5a525d840 make isMergeable asyncronous 2023-09-18 10:39:48 +02:00
Nikita Galaiko
4e568420c8 fetch isMergeable asyncronously 2023-09-18 10:00:56 +02:00
Nikita Galaiko
2cfe510fc4 add can apply methods 2023-09-18 09:15:49 +02:00
Nikita Galaiko
602fca0e87 cargo fmt 2023-09-15 13:28:10 +02:00
Nikita Galaiko
f5a24cf5e5 get rid of git_commit_diff call 2023-09-15 13:24:07 +02:00
Nikita Galaiko
edbbe1f0a8 get rid of virtual / remote confusion 2023-09-15 12:46:25 +02:00
Nikita Galaiko
ae40f6abda do not send conflicts back 2023-09-15 10:11:45 +02:00
Nikita Galaiko
ee82ea03ce rm some unused code 2023-09-15 09:30:51 +02:00
Nikita Galaiko
0526d11b56 fix tests 2023-09-14 15:31:50 +02:00
Nikita Galaiko
a832a877ea rm instrumentation 2023-09-14 15:27:03 +02:00
Nikita Galaiko
df97887f52 start removing fields 2023-09-14 15:24:52 +02:00
Nikita Galaiko
b05fe81000 add db connections pool 2023-09-14 12:23:25 +02:00
Nikita Galaiko
682c2e1b82 sort tauri cargo 2023-09-14 09:07:58 +02:00
Nikita Galaiko
3c0d4acabe remove terminal 2023-09-14 08:16:26 +02:00
Nikita Galaiko
33cf7e7e63 remove files database 2023-09-13 13:53:59 +02:00
Nikita Galaiko
4da0553405 more tests 2023-09-12 13:05:01 +02:00
Nikita Galaiko
3a2e2ca34c consequential partial commits fix 2023-09-12 12:57:29 +02:00
Nikita Galaiko
e530e3c25f add failing test 2023-09-12 11:00:27 +02:00