Commit Graph

1470 Commits

Author SHA1 Message Date
estib
1368d87ed0 Base branch divergence resolution
Allow the user to choose how to resolve the base-branch divergence
2024-09-25 14:05:04 +02:00
estib
2091025227 Resolve upstream integration
Add a method to determine which should be the new base branch target commit ID based on what resolution approach is selected
2024-09-24 17:16:26 +02:00
estib
9060a4287c Ability to push the base branch
If needed, the base branch can be pushed or force pushed
2024-09-24 14:06:05 +02:00
estib
3a2cf73bcd BaseBranch: Determine whether the base diverged
Determine whether the local target has diverged from the remote,
and return some information about that
2024-09-24 13:57:22 +02:00
Esteban Vega
4d419a5001
Merge pull request #5016 from gitbutlerapp/add-tests-for-moving-commits
Factor out the `move_commit` function
2024-10-04 18:34:56 +02:00
Kiril Videlov
d262b230a8
Merge pull request #5036 from gitbutlerapp/add-series-top-base-implementation
Stacking - fixes an issue where its not possible to create additional series for the base of the stack
2024-10-04 00:29:26 +02:00
Kiril Videlov
d15e41ee73 Stacking - fixes an issue where its not possible to create additional series for the base of the stack 2024-10-03 15:22:20 -07:00
Kiril Videlov
eb88ed01c6 Stack api: Dont try to push series that are pointing to the Stack base 2024-10-03 20:52:27 +02:00
Kiril Videlov
ef1c7c139d Simplify CreateSeriesRequest
If `preceding_head` is provided, only the name of the series is sufficient
2024-10-03 20:12:49 +02:00
Kiril Videlov
efa5cbc7fd Makes it easier to create new series to the top of the stack
Adds an extra convinience API that does not require knowledge of what is the latest commit
2024-10-03 20:04:20 +02:00
Kiril Videlov
7ab8fdf0b8
Merge pull request #5031 from gitbutlerapp/series-on-list-virtual-branches-order
Fixes the order of series on the UI API (list_virtual_branches)
2024-10-03 18:56:36 +02:00
Kiril Videlov
cd4ec147b1 Fixes the order of series on the UI API (list_virtual_branches)
The UI needs the list starting with newest first.
Updated docs.
2024-10-03 18:50:56 +02:00
Kiril Videlov
e63e876ca5 Refactor - removes the change_refernce module that what the initial imlementation of stacking
This is now replaced with the more capable and correct `Stack` trait, implemented on `Branch`.

The new endpoints are:
create_series,
remove_series,
update_series_name,
update_series_description,
push_stack,
2024-10-03 18:39:50 +02:00
Kiril Videlov
3fc1687f86
Merge pull request #5027 from gitbutlerapp/reverse-patches-in-stack-series 2024-10-03 07:22:34 +02:00
Kiril Videlov
9c9c0fe5aa fix: list_virtual_branches series patch order should be newest to oldest 2024-10-03 06:16:03 +02:00
Kiril Videlov
d8c00133aa fix: Replace log range with merge base in Stack trait 2024-10-03 06:01:35 +02:00
dependabot[bot]
69752599be
Bump the rust-updates group across 1 directory with 13 updates
Bumps the rust-updates group with 13 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde) | `1.0.209` | `1.0.210` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.63` | `1.0.64` |
| [backtrace](https://github.com/rust-lang/backtrace-rs) | `0.3.73` | `0.3.74` |
| [once_cell](https://github.com/matklad/once_cell) | `1.19.0` | `1.20.1` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.7` | `0.12.8` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.127` | `1.0.128` |
| [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions) | `1.4.0` | `1.4.1` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.12.0` | `3.13.0` |
| [tauri-build](https://github.com/tauri-apps/tauri) | `1.5.4` | `1.5.5` |
| [tokio-util](https://github.com/tokio-rs/tokio) | `0.7.11` | `0.7.12` |
| [rstest](https://github.com/la10736/rstest) | `0.22.0` | `0.23.0` |
| [clap](https://github.com/clap-rs/clap) | `4.5.16` | `4.5.19` |
| [regex](https://github.com/rust-lang/regex) | `1.10.6` | `1.11.0` |



Updates `serde` from 1.0.209 to 1.0.210
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210)

Updates `thiserror` from 1.0.63 to 1.0.64
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.63...1.0.64)

Updates `backtrace` from 0.3.73 to 0.3.74
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.73...0.3.74)

Updates `once_cell` from 1.19.0 to 1.20.1
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.19.0...v1.20.1)

Updates `reqwest` from 0.12.7 to 0.12.8
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.7...v0.12.8)

Updates `serde_json` from 1.0.127 to 1.0.128
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/1.0.127...1.0.128)

Updates `pretty_assertions` from 1.4.0 to 1.4.1
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases)
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.4.0...v1.4.1)

Updates `tempfile` from 3.12.0 to 3.13.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0)

Updates `tauri-build` from 1.5.4 to 1.5.5
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-build-v1.5.4...tauri-build-v1.5.5)

Updates `tokio-util` from 0.7.11 to 0.7.12
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.11...tokio-util-0.7.12)

Updates `rstest` from 0.22.0 to 0.23.0
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/v0.22.0...v0.23.0)

Updates `clap` from 4.5.16 to 4.5.19
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.16...clap_complete-v4.5.19)

Updates `regex` from 1.10.6 to 1.11.0
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.6...1.11.0)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: backtrace
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: pretty_assertions
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: tauri-build
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-02 22:37:53 +00:00
Kiril Videlov
ef91acc71a Fixes an issue initializing stacks 2024-10-03 00:17:58 +02:00
Kiril Videlov
e00f47aea5 list_virtual_branches now includes the series data
at this point only local patches are returned
2024-10-02 23:49:58 +02:00
Kiril Videlov
99e48e4f3e Initialize the Stack heads for branches during get_applied_status 2024-10-02 22:25:44 +02:00
Kiril Videlov
0ccd6709b6 Implementa helper Stack method for updating latest stack series head 2024-10-02 22:24:42 +02:00
Kiril Videlov
b8f69d9406 Wire up v2 stacking api as Tauri commands 2024-10-02 20:47:50 +02:00
Kiril Videlov
c94e8d121f Update of series name disallowed after push 2024-10-02 20:26:05 +02:00
Kiril Videlov
89960f6bfc Make stack initialization more forgiving 2024-10-02 19:28:29 +02:00
estib
c804699fd1 move commit: Check whether the commit is locked to it's ancestors
If the commit being moved depends on changes made in any of the ancestor commits, raise an error.

Add integration tests for that
2024-10-02 18:57:54 +02:00
Kiril Videlov
f699b72768 Implement support for creating and updating Series description 2024-10-02 18:20:23 +02:00
estib
ef418a20d7 move commit: Prefer rebase
- Prefer rebase than calculating the commit out of the diff
2024-10-02 17:38:51 +02:00
estib
337096a254 move commit: Add tests for multiple commits
- Add tests for moving commits in between branches that have exisiting commits in them
- Assert the contents of the commit and uncommitted files
2024-10-02 12:00:02 +02:00
Kiril Videlov
7d9f440fd6 Fix listing of stack series 2024-10-02 11:40:45 +02:00
Kiril Videlov
03659e4731 Add tests for Stack method push_series 2024-10-02 01:49:12 +02:00
Kiril Videlov
b5325e2d55 Add tests for Stack method update_series 2024-10-02 01:20:37 +02:00
Kiril Videlov
28a6e0a2bf Fixe an issue with Stack.add_series 2024-10-01 23:46:22 +02:00
Kiril Videlov
9ce6dd8635 Rename Stack trait methods to refer to 'series' 2024-10-01 21:51:53 +02:00
Kiril Videlov
4cf5983dfb Stacking: maintain correct order of heads when updating 2024-10-01 18:28:24 +02:00
Kiril Videlov
72e6004f1c Stack: move functions for manipulating heads to own module 2024-10-01 17:41:33 +02:00
Kiril Videlov
00e2b891dd Stacking: Assert no loose commits can be created (outside of a series) 2024-10-01 17:37:26 +02:00
Kiril Videlov
1b953d286c Stacking: enforce that patch references point to changeIDs when available 2024-10-01 17:19:04 +02:00
Kiril Videlov
04c17656bb Stacking: Maintain the correct heads order when adding new ones 2024-10-01 16:12:49 +02:00
estib
876817eaba Factor out the move_commit function
Move the `move_commit` function to a separate module.
Add some unit tests for testing whether the commit is locked.
2024-10-01 13:35:49 +02:00
Kiril Videlov
3ba6f7238a Tests for Stack trait implementation 2024-09-30 00:22:35 +02:00
Kiril Videlov
d0c1679b68 Adds a "list_branches" (series) method to the Stack trait
This pre-computes a list of which commits/patches belong to which series in the stack
2024-09-29 22:18:15 +02:00
Kiril Videlov
f6ec80d8ce Adds a trait Stack with an implementation for Branch
This provides a well defined interface for interacting with Stacks. It is implemented for gitbutler_branch::Branch, and it is specifically meant to operate on and update the `heads` field of Branch
This facilitates creating, updating, removing, pushing and listing of "stacked branches" within the Stack (formerly the virtual branch).
2024-09-29 19:26:39 +02:00
Kiril Videlov
a2aafd919b Introduce PatchReference and a heads field on Branch
- The PatchReference type represents a "reference" that is entirely managed by GitButler. It can either point to a commit or a GitButler change (which itself points to a commit)
- The Branch type (as persisted in virtual_branches.toml) now has a `heads` fields with a list of PatchReferences. This list is not to be meant to be manipulated directly, but with the `Stack` trait
2024-09-28 12:34:29 +02:00
Caleb Owens
a468ec7783 Added the tests 2024-10-01 17:12:46 +02:00
Mattias Granlund
1cdc3b7110 Add patch series to vbranch API struct 2024-10-01 16:09:07 +02:00
Caleb Owens
d571ee2ddb Fix applying mergable branch 2024-10-01 13:32:48 +02:00
Kiril Videlov
3742349a22
Merge pull request #4999 from icorbrey-contrib/master
chore: Bump `git2-hooks`
2024-09-30 19:00:56 +02:00
Caleb Owens
3a921031d3 Remove erroniously preserved dbg statements 2024-09-30 18:08:23 +02:00
Caleb Owens
c7d2bfa025 Support symlinks in create_wd_tree 2024-09-30 18:02:46 +02:00
Isaac Corbrey
7045f1c365 chore: Bump git2-hooks 2024-09-30 11:54:34 -04:00
Caleb Owens
511ca5212e Support executable blobs 2024-09-30 17:34:20 +02:00
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
Kiril Videlov
9dde8e7f7e
Merge pull request #4995 from gitbutlerapp/Use-new-checkout_combined_trees-in-upstream-integration
Use the new checkout_combined_trees in upstream integration
2024-09-30 11:36:28 +02:00
Caleb Owens
dc45ab2aac Use the new checkout_combined_trees in upstream integration 2024-09-30 02:01:11 +02:00
Caleb Owens
c3f6db382a Add more tests to undo commit 2024-09-30 01:53:21 +02:00
Caleb Owens
87663bea2d Remove instances where add_all was used to get a tree of the current working directory 2024-09-29 23:39:23 +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
be1fc2cf7e Checkout trees after reordering (and make generic function for it) 2024-09-28 18:46:41 +02:00
Caleb Owens
947a9c7ff1 Fix branch.tree properties getting set to conflicted trees. 2024-09-28 18:45:11 +02:00
Caleb Owens
7f348d8a6d Add tests for reordering commits 2024-09-28 17:50:32 +02:00
Nico Domino
216fca1cec
fix: simplify crates/package.json setup (#4986) 2024-09-28 15:29:48 +00:00
Nico Domino
8b84f46df1
fix: add crates to pnpm-workspace to avoid Vercel CI (#4855) 2024-09-28 12:19:25 +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
9cbebba5cf
Fix testcase for merge_vbranch_upstream_clean_rebase 2024-09-25 15:15:29 +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
0e63323456
remove commit-buffer as it's not needed anymore for dealing with headers. 2024-09-24 15:57:58 +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
ada4b17c47
Make sure test doesn't fail if the default branch isn't master.
Ideally repository creation is standardized to avoid these issues,
but for now this is just the minimal fix to make the test suite
work for me.
2024-09-24 11:08:10 +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
estib
7dbadb13a9 Get the upstream name from the pushed virtual branch
Once the push of a virtual branch succeeded, return the ref name and the remote name in order to correctly determine which branch name to create a PR from.
2024-09-16 18:15:06 +02:00
estib
184629d1d4 Create a method to find a commit by its ID
Find a commit in the repository by its ID
2024-09-18 16:46:16 +02:00
Nico Domino
992496f6a5
fix: protect read file from path traversal (#4943) 2024-09-22 17:12:45 +00:00
estib
d1c71898cc The edit branch should not be listed in the side bar
The `gitbutler/edit` branch should not be listed in the side bar of the application
2024-09-18 14:28:25 +02:00
Caleb Owens
224c03528b Improve index resolution 2024-09-18 11:45:38 +02:00
Caleb Owens
2a3f0e8a04 Fix (some) wrong files displaying in edit mode 2024-09-17 14:31:58 +02:00
estib
4dca18ff3e fix: Calculate the right file tree when resolving
Get the correct file tree when resolving a conflict
2024-09-18 11:11:00 +02:00
ndom91
ad2290dc7a fix: bump tauri@1.8.0 in preparation for v2 upgrade 2024-09-17 17:10:45 +02:00
Caleb Owens
cc8d3f4810 Did shit good 2024-09-16 16:42:23 +02:00
Caleb Owens
be4652653a Handle merge commits better in edit mdoe 2024-09-13 17:20:13 +02:00
Caleb Owens
d995a04b31 Correct merge commit logic 2024-09-13 12:57:46 +02:00
Caleb Owens
4ff32885e4 Start using new rebasing code when applying branches 2024-09-13 12:34:21 +02:00
Caleb Owens
e626a6f6ba Resolve creation/deletion conflicts 2024-09-13 12:32:01 +02:00
Kiril Videlov
57c3e8b5d2
Merge pull request #4900 from Byron/better-locking
ignore lock-errors on filesystems that lack support
2024-09-16 10:22:51 +02:00
Mattias Granlund
b4f30530b0 Drop unnecessary mapping of error code on push failure
- the removed line would overwrite any previously set code
- unknown is still the default if code is missing
2024-09-16 10:20:14 +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
Sebastian Thiel
6285d9177e
fix: ignore lock-failures on filesystems that don't support it (#4895)
Just like `cargo` does.
2024-09-14 08:48:17 +02:00
Esteban Vega
1a47f5ec4d
Merge pull request #4850 from gitbutlerapp/ndom91/use-template-dropdown
fix: refactor pr template path input to pre-filled `Select` instead of `TextBox`
2024-09-13 17:25:58 +02:00
Caleb Owens
edd0cbe0e6 Rename unapplying 2024-09-13 16:58:42 +02:00
ndom91
aa91c4ca42 fix: cargo test 2024-09-13 12:25:21 +02:00
ndom91
e8bb66c151 fix: use relativePath and get project basePath on rust side 2024-09-13 12:01:03 +02:00
ndom91
e842b282ae fix: merge conflicts 2024-09-13 11:15:06 +02:00
Caleb Owens
db992dedfa
Merge pull request #4869 from gitbutlerapp/update-api
Update api
2024-09-12 13:23:05 +02:00
Caleb Owens
932070ca1f
Read index 2024-09-12 13:03:04 +02:00
Caleb Owens
1389b9e465
A time before time 2024-09-12 12:46:36 +02:00
Sebastian Thiel
630c253637
for safety, don't fail if the file to be removed doesn't exist.
The code could run into this if `allow_new_file` is `true` and no
file actually exists.
Maybe in practice this can't happen, but calls can be made that trigger this.
2024-09-11 21:39:21 +02:00
Sebastian Thiel
ffdb0f6e2f
Minor refactor for slightly improved readability
Maybe the intent of some parts is clearer now as well.
2024-09-11 21:34:18 +02:00
Kiril Videlov
530a982379
fixes a bug where discarding created files does not work 2024-09-11 21:06:50 +02:00
Kiril Videlov
63a8603054
fixes a bug where discarding deleted files doesnt work 2024-09-11 21:06:34 +02:00
Kiril Videlov
8ad8797b5d
whenever a hunk is reversed also reverse change type 2024-09-11 20:48:09 +02:00
Kiril Videlov
199129162d
on empty new file the generic hunk is type added 2024-09-11 20:47:15 +02:00
Caleb Owens
aeea013ba0
Update base branch button feature flagged 2024-09-11 15:18:20 +02:00
Caleb Owens
6e7aefd5c3
Merge commiting 2024-09-11 14:47:36 +02:00
Caleb Owens
955c99e5d8
Rebasing working 2024-09-11 13:43:39 +02:00
Caleb Owens
191686ec4d
Ahhh, don't loose shit 2024-09-11 11:23:20 +02:00
ndom91
8194283275 fix: simplify error handling read_file_from_workspa 2024-09-10 19:22:03 +02:00
ndom91
b7a037b1dc fix: move new template methods to PRService 2024-09-10 19:18:42 +02:00
ndom91
13c866da73 Merged origin/master into ndom91/use-template-dropdown 2024-09-10 18:56:29 +02:00
ndom91
781fbb5a13 fix: merge conflict 2024-09-10 18:55:45 +02:00
GitButler
e889d90779 GitButler WIP Commit 2024-09-10 18:45:48 +02:00
Kiril Videlov
f93fad98c1
Update gix-path to version 0.10.11 2024-09-10 17:37:10 +02:00
ndom91
f53b5b8f2e chore: more cleanup 2024-09-10 17:34:22 +02:00
Kiril Videlov
4ddc6a9a32
Merge pull request #4863 from gitbutlerapp/update-branch-repo-commit-removal
fix a bug where deleting a vbranch fails to update state
2024-09-10 17:32:02 +02:00
ndom91
4aa9e96ced fix: use pullRequestPath as boolean 2024-09-10 17:24:51 +02:00
Kiril Videlov
620ea1418f
Merge pull request #4864 from Zamoca42/fix/wsl-window-maximize-bug
fix: A bug with Wayland display (Error 71) in WSL
2024-09-10 17:23:34 +02:00
ndom91
eecea80884 fix: read pr tempalte from disk 2024-09-10 17:14:35 +02:00
Chooooooo
d4718f73bc fix: Disable window state plugin on Linux
Disable the `tauri_plugin_window_state` plugin on Linux platforms as it
causes issues with the application's window behavior. This change ensures
the application runs smoothly across all supported platforms.
2024-09-10 23:42:24 +09:00
ndom91
25bbe28411 fix: cleanup and pass absolute path from rust to FE 2024-09-10 13:55:18 +02:00
Chooooooo
0dc81b1e49 fix: Disable window state plugin for now
The window state plugin is causing issues with the application, so it is being temporarily disabled. This change will allow the application to function without the plugin until the issue can be resolved.
2024-09-10 20:42:47 +09:00
ndom91
e888025499 fix: move PrTemplate fns to gitHost 2024-09-10 12:22:02 +02:00
estib
f19c2158eb push_virtual_branch: Return the remote reference
Pushing a virtual branch also returns the branch refname
2024-09-10 11:12:30 +02:00
Kiril Videlov
310d4cf73a
fix a bug where deleting a vbranch fails to update state 2024-09-10 10:55:36 +02:00
ndom91
bfe299aa98 fix: cleanup and PR review 2024-09-10 10:37:15 +02:00
ndom91
cb733d707a chore: add note for future improvement 2024-09-09 15:48:24 +02:00
ndom91
a5fb400985 fix: simplify setting git_host default settings in projects.json 2024-09-09 15:35:15 +02:00
ndom91
22f71c2a58 fix: rename get_pr_templates fn to github specific 2024-09-09 15:22:05 +02:00
ndom91
7dee307aa6 fix: add instrumentation to new tauri cmd and rm unnecessary reference 2024-09-09 15:07:33 +02:00
ndom91
d7badd82a5 fix: enable saving git_host settings to projects.json 2024-09-08 18:34:45 +02:00
ndom91
32f13df06d fix: handle old projects which dont have git_host project settings key 2024-09-08 18:23:05 +02:00
ndom91
460e19299a fix: refactor out use of Persisted store values for pr template boolean and path 2024-09-08 18:11:39 +02:00
ndom91
3c812cb963 fix: move getAvailableTemplates functionality from project service to github service 2024-09-08 17:42:08 +02:00
ndom91
ac420780e0 fix: walk .github recursively 2024-09-08 17:11:54 +02:00
ndom91
6396bfea45 fix: cleanup 2024-09-08 16:39:19 +02:00
ndom91
bbe9249a01 fix: git paths 2024-09-08 16:34:58 +02:00
ndom91
e2bb456f7d feat: initial template dropdown support 2024-09-08 16:16:09 +02:00
Sebastian Thiel
a4df70c422
refactor clone for clarity 2024-09-07 21:08:31 +02:00
Nico Domino
68f0a3c288
fix: use our own open-rs implementation instead of relying on tauri's "shell-open" (#4748)
Co-authored-by: Yerke Tulibergenov <yerke@squareup.com>
Co-authored-by: Caleb Owens <caleb@gitbutler.com>
Co-authored-by: Pavel Laptev <pawellaptew@gmail.com>
Co-authored-by: Mattias Granlund <mtsgrd@gmail.com>
Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
2024-09-07 19:28:50 +02:00
Kiril Videlov
245c8dfd1c
Merge pull request #4841 from gitbutlerapp/workspace-migration-fix-branch
fixes a test that should be using writable fixture
2024-09-06 15:55:51 +02:00
Kiril Videlov
df4d6ac099
fixes a test that should be using writable fixture 2024-09-06 15:18:09 +02:00
Kiril Videlov
7693b7b9ac
removes the legacy bool indicatin a vbranch is applied 2024-09-06 15:16:20 +02:00
Kiril Videlov
95e946b8a1
Remove unnecessary VirtualBranchActions struct 2024-09-06 14:12:14 +02:00
Kiril Videlov
2cad53efa4
Merge pull request #4838 from gitbutlerapp/update-set-branch-target-logic-impl
remove unused set branch target function
2024-09-06 11:25:55 +02:00
Kiril Videlov
b9e39a4503
remove unused set branch target function 2024-09-06 11:08:36 +02:00
Kiril Videlov
3899975d6c
remove useless credentials helper struct 2024-09-06 11:03:57 +02:00
Esteban Vega
9105a7b1ff
Merge branch 'master' into unapply-only-hunks-from-lane 2024-09-04 14:28:23 +02:00
Caleb Owens
e4834dbba9 Fancy fast forward 2024-09-04 14:39:38 +03:00
Sebastian Thiel
50c75eef60 refactor backend of reset_files() to be more idiomatic
It also tries to use `Vec<PathBuf>` in the tauri interface, which is
still to be validated.
2024-09-04 08:43:24 +02:00
estib
4eabbaad86 Decouple the get_raw project method
Decouple the `get_raw` method from other variants and only return the information about the project is returned.
This skips any other logic excecuted by the other methods (e.g. `get_inner`)
2024-09-03 13:17:17 +02:00
estib
34e102f336 Only discard the files changes inside the lane
When using the file context menu inside a given lane to discard the changes, only the changes to that file inside the lane should be discarded.
Any other changes to that same file that live in other lanes are kept
2024-09-03 11:34:19 +02:00
estib
395104fb67 Skip the project directory creation when getting the project
When only getting the project information, don't recreate the project directory.
This allows the app to get the information about a project, which path has been moved.
2024-09-02 18:06:34 +02:00
estib
2129ad5a3d Ability to update the path of a project 2024-09-02 17:40:05 +02:00
estib
c1cd40a811 Optionally, skip the validation when getting the project
Add flag to enable getting the project information from the storage without performing the validation
2024-09-02 17:39:40 +02:00
estib
2c6f295cc5 Remove unused method: delete project by path 2024-09-02 17:38:00 +02:00
estib
105ad7d0fa Resolve linting errors 2024-09-02 15:18:31 +02:00
estib
be89f303d2 Can remove repository if it's missing 2024-09-02 14:44:03 +02:00
Kiril Videlov
9c0700ba75
Merge pull request #4809 from gitbutlerapp/dependabot/cargo/rust-updates-e51a9d5fb3
Bump the rust-updates group with 3 updates
2024-09-02 22:18:00 +02:00
Mattias Granlund
260e81a94e Use simpler function for asserting workspace is open. 2024-09-02 20:53:19 +03:00
Mattias Granlund
a5962b7e46 Fix spelling mistakes 2024-09-02 20:53:19 +03:00
Mattias Granlund
85ebc4ea78 Add test to ensure old integration branch doesn't throw 2024-09-02 20:53:19 +03:00
Mattias Granlund
0db82ea38c Replace all relevant occurrences of integration with workspace 2024-09-02 20:53:19 +03:00
Mattias Granlund
9acab668cc Fix broken test
- make use of integration commit title constant
2024-09-02 20:53:19 +03:00
Mattias Granlund
f3e5228fed Update workspace commit message 2024-09-02 20:53:19 +03:00
Mattias Granlund
d217d96285 Add transition for integration commit detection 2024-09-02 20:53:19 +03:00
Mattias Granlund
5f9c2e5832 Rename gitbutler/integration -> gitbutler/workspace 2024-09-02 20:53:19 +03:00
dependabot[bot]
6aaf2d89ec
Bump the rust-updates group with 3 updates
Bumps the rust-updates group with 3 updates: [tokio](https://github.com/tokio-rs/tokio), [sysinfo](https://github.com/GuillaumeGomez/sysinfo) and [rstest](https://github.com/la10736/rstest).


Updates `tokio` from 1.39.3 to 1.40.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.39.3...tokio-1.40.0)

Updates `sysinfo` from 0.31.3 to 0.31.4
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.31.3...v0.31.4)

Updates `rstest` from 0.21.0 to 0.22.0
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-01 15:57:33 +00:00
Sebastian Thiel
fe970e1fcd
Trace the git binary path (#3601)
This should help in cases the binary can't be found nonetheless,
for yet to be clarified reason.
2024-08-30 15:29:49 +02: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
Kiril Videlov
af6fdc36a4
add api for updating change references 2024-08-30 12:38:50 +02:00
Caleb Owens
0802d1c477
Resolve merge in less stupid manner 2024-08-30 11:05:20 +02:00
Sebastian Thiel
4d495cb3bc
Adjust integration check to also recognize by matching tree.
This is relevant when all commits are equal by tree, but seem changed
due to the added GitButler headers.

For added safety, we also compare by commit message, date and authors,
basically everything that isn't the headers.
2024-08-30 07:15:47 +02:00
Sebastian Thiel
4cafc909b0
Improve the clarity of performance logs 2024-08-30 07:15:47 +02:00
Sebastian Thiel
4ae354392b
Improve performance of list-local using git2. 2024-08-30 07:15:47 +02:00
Sebastian Thiel
36f23d529f
CLI with branch list-remotes to list remote branches 2024-08-30 07:15:46 +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
b03ba56288
Merge pull request #4784 from Byron/fix-features
Remove unnecessary `gix` features from `watcher` and add them to `tauri`
2024-08-29 09:50:53 +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
a7b01bd641
Keep using get_workspace_head() when no cached result is used.
That way, the application will not run into unexpected cases.
2024-08-29 09:34:54 +02:00
Sebastian Thiel
79798c7407
Exclude big files when performing a worktree diff.
This was lost previously when switching it over to a read-only
implementation.
Implementing it with an ignore list will take time, 400ms in the GitLab
repository, but it's not slower than it was before and it is always
preferred to not dump objects into the ODB unnecessarily.
2024-08-29 09:31:59 +02:00
Sebastian Thiel
8c7159d906
Remove unnecessary gix features from watcher and add them to tauri 2024-08-29 07:26:29 +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
751e091f6f
Reuse the worktree-diff during 'recalulate-everything'
It's used for emission of changed files, but also for listing
branch information.

Make sure we only run the worktree-status once to save time.

This also unifies the acquisition of the `HEAD^{commit}`,
which one day will be a natural feature once `gix::Repository`
is used.
2024-08-28 21:42:29 +02:00
Sebastian Thiel
13deabdebd
find large files more quickly thanks to gix based dirwalk
Also make sure that important `gix` crates are always compiled
with optimization for proper performance.

This is particularly useful when optimizing performance as not
everything has to be done in release mode.

However, it also causes CI to be slower as it compiles some
dependencies longer.

The problem realy is that `tauri dev` doesn't support custom profiles,
so there is only `dev` and `release`.
2024-08-28 21:19:47 +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
Sebastian Thiel
41c053474a
Assure HTTPS support is compiled into gix using curl. 2024-08-28 12:55:44 +02:00
Sebastian Thiel
fc63929da3
Add a flag to allow performance logging: GITBUTLER_PERFORMANCE_LOG
````
GITBUTLER_PERFORMANCE_LOG=1 LOG_LEVEL=debug pnpm tauri dev
````

Additionally, some noise was removed by turning a warning into
a trace.
2024-08-28 11:41:29 +02:00
Sebastian Thiel
7e0878a14f
Use read-only worktree diff
The worktree diff is essentially a 'git status' with a given tree,
and that can be expressed with a diff of the workdir, the index and a tree.

This comes at the expense of not being able to control which file sizes are diffed.
2024-08-28 11:10:04 +02:00
Sebastian Thiel
30cc6a4838
Add branch status to CLI
It calls `list_virtual_branches()` which kind of has the effect of a status call.
2024-08-28 11:10:02 +02:00
Sebastian Thiel
dd724f310d
Also debug-trace information on list_virtual_branches calls.
This can be useful for those who seek extra information, and while it's
dominating refresh times.
2024-08-28 11:09:33 +02:00
Kiril Videlov
12d48df0f7
Merge pull request #4774 from gitbutlerapp/remove-unused-feature-flag
remove unused feature flag
2024-08-27 20:57:26 +02:00
Kiril Videlov
74e7b1eeb5
remove unused feature flag 2024-08-27 20:46:22 +02:00
Kiril Videlov
e9d6d647d0
build: add a .vercelignore to ignore all files in crates 2024-08-27 19:59:18 +02:00