Commit Graph

258 Commits

Author SHA1 Message Date
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
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
9c9c0fe5aa fix: list_virtual_branches series patch order should be newest to oldest 2024-10-03 06:16:03 +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
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
89960f6bfc Make stack initialization more forgiving 2024-10-02 19:28:29 +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
Isaac Corbrey
7045f1c365 chore: Bump git2-hooks 2024-09-30 11:54:34 -04: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
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
7f348d8a6d Add tests for reordering commits 2024-09-28 17:50:32 +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
bbbf81c4c1 Start to introduce index resolution tests 2024-09-24 17:01:38 +02:00
Sebastian Thiel
fe7d5d92e7
add crate to keep gitoxide conversions to prevent duplication 2024-09-24 15:54:07 +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
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
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
2a3f0e8a04 Fix (some) wrong files displaying in edit mode 2024-09-17 14:31:58 +02:00
Caleb Owens
cc8d3f4810 Did shit good 2024-09-16 16:42:23 +02:00
Caleb Owens
4ff32885e4 Start using new rebasing code when applying branches 2024-09-13 12:34:21 +02:00
Caleb Owens
edd0cbe0e6 Rename unapplying 2024-09-13 16:58:42 +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
Kiril Videlov
63a8603054
fixes a bug where discarding deleted files doesnt work 2024-09-11 21:06:34 +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
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
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
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