Commit Graph

85 Commits

Author SHA1 Message Date
Caleb Owens
e4834dbba9 Fancy fast forward 2024-09-04 14:39:38 +03:00
Mattias Granlund
0db82ea38c Replace all relevant occurrences of integration with workspace 2024-09-02 20:53:19 +03:00
Mattias Granlund
5f9c2e5832 Rename gitbutler/integration -> gitbutler/workspace 2024-09-02 20:53:19 +03: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
Caleb Owens
0802d1c477
Resolve merge in less stupid manner 2024-08-30 11:05:20 +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
47b6d41a26
Merge pull request #4771 from Byron/git2-to-gix
list virtual branches performance
2024-08-29 09:50:35 +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
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
Kiril Videlov
06f50b4531 Merge branch 'master' into branch-stacking-first-stab 2024-08-27 14:13:08 +02:00
Kiril Videlov
b943c35293
code review fixes 2024-08-27 14:05:27 +02:00
Caleb Owens
d386790930
resolve to our side 2024-08-27 14:00:56 +02:00
Caleb Owens
0b397d2368
Jiggle some code about 2024-08-27 13:05:28 +02:00
Caleb Owens
3fb5077c4a
Somethign somethign matchy matchy design 2024-08-27 13:05:27 +02:00
Kiril Videlov
cef701796d
update the create reference method to take change id 2024-08-26 20:49:01 +02:00
Caleb Owens
e463e2b2e9 Correct the tree side which we write 2024-08-26 19:34:44 +02:00
Kiril Videlov
66257fba2f
rename reference module to change_reference 2024-08-26 19:15:58 +02:00
Kiril Videlov
89d1186b06
refactor this to be a ChangeReference
it turns out that a reference to a change_id is all that we need
2024-08-26 17:02:38 +02:00
Caleb Owens
f6dae49a8d Commits and another enum correction 2024-08-26 15:40:22 +02:00
Caleb Owens
3170042895
Merge pull request #4754 from gitbutlerapp/Use-correct-sides
Use the auto-resolution if the head is conflicted
2024-08-26 15:11:08 +02:00
Caleb Owens
ca0ece9d49 Use the auto-resolution if the head is conflicted 2024-08-26 15:05:36 +02:00
Sebastian Thiel
1520a4b7a3
make GPG related spawn failures even clearer (#4750)
This should help self-disagnose probelms aroung GPG not being found.
2024-08-25 09:18:33 +02:00
Kiril Videlov
4668a1ec3d
update create and update reference apis
No need to provide the change_id as it can be obtained from the commit itself
2024-08-23 14:32:31 +02:00
Sebastian Thiel
7ee0520ffb
Use latest rev_walk() based API.
It's a bit more intuitive than `id().ancestors()` when coming from `git2`.
2024-08-23 13:08:37 +02:00
Kiril Videlov
aea72e8605
update any branch references during cherry rebase 2024-08-23 00:03:58 +02:00
Kiril Videlov
12f826b9ad
move the stacking impl to repo crate
There is just too big of a dependency in both directions to be able to have a separation at this time. The gitbutler-repo crate is needed for the stacking functionality and the `rebase` module inside of it needs to use the new API in order to maintain consistency during rebasing.
2024-08-22 23:29:13 +02:00
Caleb Owens
ec7a38f538
Merge pull request #4717 from gitbutlerapp/Rebase-revolution
Rebase revolution
2024-08-22 18:28:49 +02:00
Caleb Owens
553ca5846f correct lifetime names 2024-08-22 18:16:16 +02:00
Caleb Owens
893b3fc499 Use a default variant on enum 2024-08-22 18:04:11 +02:00
Caleb Owens
c987629262 Add project specific setting and refactor 2024-08-22 17:57:03 +02:00
Caleb Owens
b45a52f111 Remove empty merge commits 2024-08-22 15:27:34 +02:00
Sebastian Thiel
96e0d3e83f
add --trace to enable tracing
This is useful to get simple performance metrics.
2024-08-21 19:23:42 +02:00
Caleb Owens
ace6facb24 Getting behaviour locked in 2024-08-21 14:45:41 +02:00
Caleb Owens
4f2a0817c7 Reduce gitbutler_cherry_pick to one code path 2024-08-20 14:51:54 +02:00
Caleb Owens
e07b4b2d0d Refactor some code 2024-08-20 10:51:34 +02:00
Caleb Owens
65fb462d64 Rebase revolution
Co-authored-by: Scott <schacon@gmail.com>
2024-08-19 18:10:28 +02:00
Caleb Owens
7ab7731a31 Add edit mode actions
More edit mode
2024-08-19 11:03:51 +02:00
Sebastian Thiel
200b6e6d02
Fail when no author was found, and mark the error so the UI can react. 2024-08-15 08:53:19 +02:00
Kiril Videlov
05650b1e96
removes a code path through which an unknown ssh host is added as a known host
This functionality existed for convinience, before the app was able to fork exec to the git binary. Removing this as this trade off is no longer necessary or relevant
2024-08-14 16:26:24 +02:00
Sebastian Thiel
4c76e2a6ee
Revert "Revert "Merge pull request #4652 from gitbutlerapp/git2-to-gix""
This reverts commit 88496e6219.
2024-08-09 10:30:52 +02:00
Kiril Videlov
88496e6219 Revert "Merge pull request #4652 from gitbutlerapp/git2-to-gix"
This reverts commit ae8b05ae70, reversing
changes made to 4d9b6a4a93.
2024-08-09 10:18:51 +02:00
Sebastian Thiel
3043f099b7
remove unnecessary BString-related serde functions.
They are supported when the respective bstring feature is used.
2024-08-08 17:25:18 +02:00
Kiril Videlov
05a814146e
Ensure ignored/submodule files and dirs are ignored 2024-08-06 11:47:59 +02:00
dependabot[bot]
c9c4630087
Bump the rust-updates group across 1 directory with 8 updates
Bumps the rust-updates group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.62` | `1.0.63` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.38.0` | `1.39.2` |
| [console-subscriber](https://github.com/tokio-rs/console) | `0.3.0` | `0.4.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.120` | `1.0.121` |
| [assert_cmd](https://github.com/assert-rs/assert_cmd) | `2.0.14` | `2.0.15` |
| [clap](https://github.com/clap-rs/clap) | `4.5.9` | `4.5.13` |
| [bstr](https://github.com/BurntSushi/bstr) | `1.9.1` | `1.10.0` |
| [toml](https://github.com/toml-rs/toml) | `0.8.14` | `0.8.15` |



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

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

Updates `console-subscriber` from 0.3.0 to 0.4.0
- [Release notes](https://github.com/tokio-rs/console/releases)
- [Changelog](https://github.com/tokio-rs/console/blob/main/release-plz.toml)
- [Commits](https://github.com/tokio-rs/console/compare/console-subscriber-v0.3.0...console-subscriber-v0.4.0)

Updates `serde_json` from 1.0.120 to 1.0.121
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.120...v1.0.121)

Updates `assert_cmd` from 2.0.14 to 2.0.15
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v2.0.14...v2.0.15)

Updates `clap` from 4.5.9 to 4.5.13
- [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.9...v4.5.13)

Updates `bstr` from 1.9.1 to 1.10.0
- [Commits](https://github.com/BurntSushi/bstr/compare/1.9.1...1.10.0)

Updates `toml` from 0.8.14 to 0.8.15
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.14...toml-v0.8.15)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: console-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: assert_cmd
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: bstr
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-updates
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 19:45:06 +00:00
Kiril Videlov
917a46c2ce
remove unnecessary method from RepoActionsExt 2024-07-31 21:16:38 +02:00
Sebastian Thiel
182381dd79
assure normalization will always provide valid ref-names, or fail.
Otherwise, it's possible to run into `git2` errors, which are
more 'indirect'.
2024-07-31 18:52:01 +02:00
Sebastian Thiel
a5bc727705
let integration commit also respect author and committer times. 2024-07-31 18:52:01 +02:00
Sebastian Thiel
76d687b55c
Respect author-date for setting up completely static commmit graphs
This updates to a yet-to-be-released version of `gix` to be able to
leverage full local-time support thanks to the usage of `jiff`.

This means we can now rely on the local `now()` that `gix` signatures
come with, which naturally respect environment variables that help
to make commits statically known.

For the running Tauri application this won't have an effect as it won't
inherit environment variables, but the CLI will be different in that regard.
2024-07-31 18:52:01 +02:00
Mattias Granlund
152b14c226 Remove now unused target_commit function 2024-07-30 18:09:07 +01:00