- Previously, the functions `init_device_oauth` and `check_auth_status` did not properly handle errors when sending requests and parsing response bodies.
- This commit updates the error handling in both functions to provide more informative error messages and properly propagate errors.
- Now, if there is an error sending the request or parsing the response body, the functions will return an `Error::Unknown` error with the appropriate context.
- This improves the reliability and error reporting of the login functionality in the client application.
The changes in this commit add support for tracking the upstream head commit in virtual branches. This is done by introducing a new field `upstream_head` in the `Branch` struct. The `upstream_head` field represents the last commit that has been pushed to the upstream branch.
The following changes were made:
- Added `upstream_head` field to the `Branch` struct
- Updated the `create_virtual_branch` function to initialize the `upstream_head` field as `None`
- Updated the `push` function to set the `upstream_head` field to the current head commit of the virtual branch
- Updated the `create_virtual_branch_from_branch` function to initialize the `upstream_head` field as `None`
- Updated the `BranchWriter` struct to write the `upstream_head` field to the branch metadata
- Updated the `TryFrom<&dyn crate::reader::Reader>` implementation
* remove GB_FLUSH after processing it
* add test for flushing and deleting flush file
* add more unittests for cases:
* no session, file -> no flush, file deleted
* session, file -> flush, file deleted
* session, no file -> no flush
The `set_user` function in the client code has been updated to return the updated user object after setting it in the app. This change allows for better handling of the user object and enables further operations on it if needed. The updated function now returns a `Result<User, Error>` instead of `Result<(), Error>`.
The changes include:
- Added support for `--apple-team-id` flag in the command line interface
- Added check for `APPLE_TEAM_ID` environment variable in the script
- Updated help text to include `--apple-team-id` flag
- Updated GitHub Actions workflow to include `--apple-team-id` flag in the command
The zip controller has been refactored to use the new zip module. This change includes updating the import statements and modifying the main function to generate the tauri context with the new zip module.
Additionally, the zip controller now has a new struct called Controller, which contains the necessary fields for handling zip operations. The TryFrom trait has been implemented for the Controller struct to allow for easy creation from the AppHandle.
The main changes include:
- Importing the zip module and updating import statements
- Refactoring the main function to generate the tauri context with the new zip module
- Creating a new Controller struct for handling zip operations
- Implementing the TryFrom trait for the Controller struct to allow for easy creation from the AppHandle