Kiril Videlov
abe2d5458a
Merge pull request #3945 from gitbutlerapp/refname-from-git2-branch
...
remove shell type git::Branch
2024-06-01 21:38:24 +02:00
Sebastian Thiel
39b2b91916
Merge pull request #3942 from gitbutlerapp/dependabot/cargo/rust-updates-668fed6552
...
Bump the rust-updates group with 17 updates
2024-06-01 21:38:07 +02:00
Kiril Videlov
7f06d988d6
remove unused file
2024-06-01 21:34:37 +02:00
Kiril Videlov
428566492b
remove shell type git::Branch
2024-06-01 21:25:27 +02:00
Sebastian Thiel
1f22948296
downgrade mock-instant to get watcher tests to work
2024-06-01 21:24:57 +02:00
Kiril Videlov
a4afd0d0df
notify of branch being unapplied only for these that we indeed applied before
2024-06-01 19:26:03 +02:00
dependabot[bot]
398558d063
Bump the rust-updates group with 17 updates
...
Bumps the rust-updates group with 17 updates:
| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde ) | `1.0.199` | `1.0.203` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.59` | `1.0.61` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.37.0` | `1.38.0` |
| [toml](https://github.com/toml-rs/toml ) | `0.8.12` | `0.8.13` |
| [anyhow](https://github.com/dtolnay/anyhow ) | `1.0.82` | `1.0.86` |
| [backtrace](https://github.com/rust-lang/backtrace-rs ) | `0.3.71` | `0.3.72` |
| [itertools](https://github.com/rust-itertools/itertools ) | `0.12.1` | `0.13.0` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.116` | `1.0.117` |
| [open](https://github.com/Byron/open-rs ) | `5.1.2` | `5.1.3` |
| [tauri-build](https://github.com/tauri-apps/tauri ) | `1.5.1` | `1.5.2` |
| [sysinfo](https://github.com/GuillaumeGomez/sysinfo ) | `0.30.11` | `0.30.12` |
| [nix](https://github.com/nix-rust/nix ) | `0.28.0` | `0.29.0` |
| [tokio-util](https://github.com/tokio-rs/tokio ) | `0.7.10` | `0.7.11` |
| [parking_lot](https://github.com/Amanieu/parking_lot ) | `0.12.1` | `0.12.3` |
| [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam ) | `0.5.12` | `0.5.13` |
| [mock_instant](https://github.com/museun/mock_instant ) | `0.3.2` | `0.4.0` |
| [rstest](https://github.com/la10736/rstest ) | `0.18.2` | `0.20.0` |
Updates `serde` from 1.0.199 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.203 )
Updates `thiserror` from 1.0.59 to 1.0.61
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.59...1.0.61 )
Updates `tokio` from 1.37.0 to 1.38.0
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0 )
Updates `toml` from 0.8.12 to 0.8.13
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.12...toml-v0.8.13 )
Updates `anyhow` from 1.0.82 to 1.0.86
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.82...1.0.86 )
Updates `backtrace` from 0.3.71 to 0.3.72
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases )
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.71...0.3.72 )
Updates `itertools` from 0.12.1 to 0.13.0
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0 )
Updates `serde_json` from 1.0.116 to 1.0.117
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.116...v1.0.117 )
Updates `open` from 5.1.2 to 5.1.3
- [Release notes](https://github.com/Byron/open-rs/releases )
- [Changelog](https://github.com/Byron/open-rs/blob/main/changelog.md )
- [Commits](https://github.com/Byron/open-rs/compare/v5.1.2...v5.1.3 )
Updates `tauri-build` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/tauri-apps/tauri/releases )
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-build-v1.5.1...tauri-build-v1.5.2 )
Updates `sysinfo` from 0.30.11 to 0.30.12
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md )
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits )
Updates `nix` from 0.28.0 to 0.29.0
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/compare/v0.28.0...v0.29.0 )
Updates `tokio-util` from 0.7.10 to 0.7.11
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.10...tokio-util-0.7.11 )
Updates `parking_lot` from 0.12.1 to 0.12.3
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.1...0.12.3 )
Updates `crossbeam-channel` from 0.5.12 to 0.5.13
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases )
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.12...crossbeam-channel-0.5.13 )
Updates `mock_instant` from 0.3.2 to 0.4.0
- [Commits](https://github.com/museun/mock_instant/compare/v0.3.2...v0.4.0 )
Updates `rstest` from 0.18.2 to 0.20.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.18.2...v0.20.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: tokio
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
- dependency-name: anyhow
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: itertools
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: open
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: tauri-build
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: sysinfo
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: nix
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: rust-updates
- dependency-name: tokio-util
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: parking_lot
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: crossbeam-channel
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: mock_instant
dependency-type: direct:production
update-type: version-update:semver-minor
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-06-01 15:38:43 +00:00
Sebastian Thiel
83893a9db3
review error docs to fit the latest changes
2024-06-01 15:24:59 +02:00
Sebastian Thiel
567a077582
simplify core::errors and remove all the cruft
2024-06-01 14:37:41 +02:00
Sebastian Thiel
0ef944ed25
Switch thiserror
with anyhow
based errors in application code
...
This should simplify most code.
2024-06-01 14:36:08 +02:00
Sebastian Thiel
a10b19ed2c
reomve all thiserror
based errors from controllers
2024-06-01 14:36:08 +02:00
Sebastian Thiel
939624f725
Remove all custom errors from virtual branches module.
...
In order to do that, errors from other modules have to go as well.
2024-06-01 14:36:05 +02:00
Sebastian Thiel
f82d25741e
use Marker
in place of Code::ProjectInvalid
...
That way, the frontend doesn't see internals.
2024-06-01 14:34:16 +02:00
Sebastian Thiel
e7c1d6033a
Remove all errors that don't trigger a custom code or context
2024-06-01 14:34:16 +02:00
Sebastian Thiel
c0fc0cfde5
Remove BranchNotFound
struct
2024-06-01 14:34:16 +02:00
Sebastian Thiel
a95c48a6cf
remove DefaultTargetNotSet in favor of a utility function
2024-06-01 14:34:16 +02:00
Sebastian Thiel
61a53c6346
Another pass at removing ProjectConflict
...
As this causes quite a lot of changes, there is this commit to capture them.
2024-06-01 14:34:13 +02:00
Sebastian Thiel
1dc52a44c0
restore detection of project conflicts
...
Previously that variant was removed even though we need it now to
easily detect this case.
2024-06-01 14:32:27 +02:00
Sebastian Thiel
20d84247e9
Prune Code
to only what's used by the UI
...
Also adjust the `Code` documentation to clarify this - otherwise
we will have more and more variants and nobody actually cares.
The frontend code is adjusted as well, as its `Code` counterpart
contained unsused variants which are now removed.
2024-06-01 14:32:27 +02:00
Sebastian Thiel
d689f36e7f
various refactors
...
Also
- add tests for ref-log file to assure it's not zero (but something more sensible)
- remove generic for convenience on most callsites
2024-06-01 14:32:19 +02:00
Kiril Videlov
d164457299
update_base_branch returns unapplied branches list
...
If merge conflicts caused branches to become unapplied, return them as a list
2024-06-01 13:11:53 +02:00
Ani Betts
035736a245
Fix the test paths
2024-05-31 15:27:16 +02:00
Ani Betts
4363f0fcc4
Leave these exports here in case we need them later
2024-05-31 15:27:16 +02:00
Ani Betts
73ab4bdd90
First hack at readding the tests
2024-05-31 15:27:16 +02:00
Ani Betts
3e34a92634
Chill out some of these logs
2024-05-31 15:27:16 +02:00
Ani Betts
bc31c65fc3
Let's just get it working
2024-05-31 15:27:16 +02:00
Ani Betts
2b3690308c
Roll back to v0.3.1 + flush changes
2024-05-31 15:27:15 +02:00
Mattias Granlund
97dfa93bda
Remove error logging related to blame
...
- blame range can include commits not in vbranch
- lookup returning none expected behavior
2024-05-31 02:37:47 +02:00
Mattias Granlund
b47a947398
Fix blame merge base
...
- use the merge base of the first commits on active branches
2024-05-31 01:57:59 +02:00
Kiril Videlov
4b8d97a500
save error on undo commit snapshot
2024-05-30 23:59:30 +02:00
Kiril Videlov
0f482934c8
save error on unapply branch snapshot
2024-05-30 23:44:58 +02:00
Kiril Videlov
618c7adedc
save error on apply branch snapshot
2024-05-30 22:31:16 +02:00
Kiril Videlov
d7ae4d85f1
first stab at saving errors in snapshots
2024-05-30 22:07:02 +02:00
Kiril Videlov
2e788de86f
Revert "fix: performance issue "
2024-05-30 20:10:23 +02:00
Kiril Videlov
e908828b3a
Merge pull request #3910 from gitbutlerapp/check-mergeable-state-of-virtual-branch
...
feat: Show merge base of virtual branch in commit list
2024-05-30 20:03:18 +02:00
Kiril Videlov
e6f75dae0f
fix: performance issue
...
this is an undo of cdf508e04c
2024-05-30 19:35:10 +02:00
Mattias Granlund
10df1621a7
Keep change id when amending a commit
2024-05-30 19:09:18 +02:00
Kiril Videlov
088eb23f8e
feat: Show merge base of virtual branch in commit list
2024-05-30 18:41:40 +02:00
Kiril Videlov
909894149f
fix a small thing
2024-05-30 17:51:27 +02:00
Kiril Videlov
8550965d14
oopsie
2024-05-30 16:33:28 +02:00
Kiril Videlov
3af46b3cae
handle merge commits
2024-05-30 16:23:40 +02:00
Kiril Videlov
7c06114ab2
list_remote_commit_files: on merge commit dont show wrong diffs
...
Right now it's not possible to show the correct diff because libgit2 doesn't have a `git diff-tree --cc` equivalent
2024-05-30 15:29:27 +02:00
Mattias Granlund
ed0663ce10
Fix invalid commit range in blame operation
...
- fixes commit_to_branch related errors
- fixes big performance problem when force push disallowed
2024-05-30 16:15:12 +02:00
Caleb Owens
251424d567
Fix origin/master showing in sidebar
2024-05-30 13:56:39 +02:00
Kiril Videlov
93d019afce
Merge pull request #3901 from gitbutlerapp/update-reflog-time
...
fixes reflog timestamps
2024-05-30 12:14:21 +02:00
Mattias Granlund
eeb99090ad
Fix incorrect workspace_head during merge conflicts
...
- without this we get an incorrect diff
2024-05-30 12:09:27 +02:00
Kiril Videlov
06ea63ee7c
fixes reflog timestamps
...
Time stapms are super imporatant for this (thanks @schacon) - without a correct time stamp, the trees will be GC'd
2024-05-30 12:02:30 +02:00
Kiril Videlov
62a3d02303
remove git::signature shell type
2024-05-29 23:51:26 +02:00
Kiril Videlov
ff9e36fb21
simplify git signature use
2024-05-29 23:37:32 +02:00
Kiril Videlov
8496dbf044
remove git::treebuilder in favor of plain git2 builder
2024-05-29 23:03:25 +02:00
Kiril Videlov
c3f374af72
remove git::FileMode shell type
2024-05-29 22:42:27 +02:00
Sebastian Thiel
7f9462a857
refactor CommitExt
...
- remove conflicting `*_gb()` methods as the native ones are easy enough to use
- some minor refactor
2024-05-29 21:47:03 +02:00
Sebastian Thiel
d5708b38bb
assure reflog is recreated if not present even if ref is present
2024-05-29 21:16:52 +02:00
Kiril Videlov
fb069e5d39
feat(git): remove unused Blob type
2024-05-29 18:14:50 +02:00
Sebastian Thiel
96dc9d2887
fix oplog-worktree merging
2024-05-29 17:58:54 +02:00
Sebastian Thiel
407ec1427b
Get performance metrics for get_wd_tree()
...
It's a tiny little function, but I think it can be slow
as it could incur a lot of work, scaling up with the size
of the repository, and the amount of untracked data in it.
Let's gather some data.
2024-05-29 17:56:12 +02:00
Kiril Videlov
d3aa5c4908
remove git::Commit wrapper type
2024-05-29 17:35:30 +02:00
Kiril Videlov
45979b4c85
remove usage of git::Commit
2024-05-29 17:33:57 +02:00
Sebastian Thiel
1abb464845
Merge pull request #3885 from gitbutlerapp/rust-remote-tweaks-for-byron
...
Tweaks to remotes code
2024-05-29 15:13:02 +02:00
Kiril Videlov
be149a5569
remove git::Tree in favor of just git2::Tree
2024-05-29 14:30:59 +02:00
Kiril Videlov
9e4bbdedec
remove unused reader functions
2024-05-29 14:04:51 +02:00
Kiril Videlov
d97bba0001
remove git::Tree from branch
2024-05-29 13:24:47 +02:00
Kiril Videlov
3c151a52cb
create a tree extension trait
...
this is useful for preserving functionality that we have added on top of git2::Tree
2024-05-29 11:15:46 +02:00
Caleb Owens
4ba15c3663
Make clippy a happy clippy
2024-05-29 11:14:29 +02:00
Caleb Owens
faa476875d
Replace &BranchId to BranchId
2024-05-29 11:07:36 +02:00
Caleb Owens
0db12b5115
Don't pass references to project_id
2024-05-29 10:47:11 +02:00
Caleb Owens
c5d841a417
Tweaks to remotes code
2024-05-29 09:52:03 +02:00
Kiril Videlov
4db276354b
remove unused import
2024-05-28 23:32:33 +02:00
Kiril Videlov
cc5e0bd8bd
remove unused repository method
2024-05-28 23:20:26 +02:00
Kiril Videlov
ce5e57d5ac
move get_wd_tree to git2::Repository extension trait
...
This way we reduce drilling and allow ourselves to eventually remove core::git types
2024-05-28 23:17:54 +02:00
Caleb Owens
9956e9f889
Introduce rust code for listing and adding remotes
2024-05-28 11:54:01 +02:00
Caleb Owens
6d1ed8474c
rename fetch_from_target to fetch_from_remotes
2024-05-28 10:14:35 +02:00
Kiril Videlov
f9ca7374e8
Merge pull request #3867 from Byron/ops-review
...
oplog-review
2024-05-28 17:35:43 +02:00
Sebastian Thiel
b0e73e5c89
oplog review
2024-05-28 17:22:02 +02:00
Kiril Videlov
e5fa064be5
Merge pull request #3873 from gitbutlerapp/update-gitbutler-integration
...
skip signing of the integration commit
2024-05-28 17:06:49 +02:00
Mattias Granlund
785bd3fb39
Fix slightly confusing code related to merging in trunk
...
- easier to understand if we only set branch.tree in one place
- enable ? return for git errors
2024-05-28 16:58:48 +02:00
Kiril Videlov
3494585679
plain commits for integration stuff
...
more
asdf
2024-05-28 16:48:07 +02:00
Josh Junon
7098fbc11b
disable stdin for invocations of ssh-keygen when signing commits
2024-05-28 13:44:24 +02:00
Sebastian Thiel
12e45142b3
recover from empty reflog files for gitbutler/target
ref
...
This also improves the tests quite a bit as it incorporates fixes
in `gix-ref`.
Also rename variables to be more descriptive, so instead of `something_sha`
name it `something_commit` as the object type is among the most interesting
bits of an object.
2024-05-28 13:25:46 +02:00
Sebastian Thiel
e82950f177
refactor reflog.rs and slightly adjust snapshot.rs
...
* reflog
- use `gix` to parse reflog, both in code as well as in tests (to be sure it's not malformed)
- avoid double-writes to reflog, instead finish transformation in memory and write final result
- assure the ref is present, independently of the reflog, catching more 'weird' states.
* minor improvements to `snapshot.rs` to avoid unnecessary clones
2024-05-28 13:25:46 +02:00
Sebastian Thiel
d952db0920
adjust pub
to make sense for actual usage (and after trait removal)
2024-05-28 13:25:46 +02:00
Sebastian Thiel
590d713f91
use git2::Oid
instead of String
; various small refactors
2024-05-28 13:25:46 +02:00
Sebastian Thiel
a5f71be44c
avoid separate exists-checks in favor of detailed error handling
...
That way we are less racy and do less IO.
2024-05-28 13:25:46 +02:00
Sebastian Thiel
e3156ba75c
remove single-use traits while leaving the structure as is
2024-05-28 13:25:46 +02:00
Sebastian Thiel
346c96869e
small refactors (see body for details)
...
- instrument snapshot creation to assure we see errors (which are ignored in code)
- move tests for public `entry` types into integration tests
- rename `OperationType` to `OperationKind` as it's more commmon in Rust
- Use `Copy` where possible
- streamline implementation: remove clones and allocations, without going zero-copy
- Prefer direct calls to traits to avoid `write!("{}")` just to invoke a trait fmt implementation
- avoid `pub` when `pub(crate)` will do
- strong type for created_at
2024-05-28 13:25:46 +02:00
Sebastian Thiel
9270ad9c1f
Assure tests don't pick up the developers signing configuration.
...
Otherwise tests will end up signing commits which is slow and
a side-effect we should test for explicitly.
2024-05-28 13:25:46 +02:00
Sebastian Thiel
6224c70695
fix integration test structure to assure tests run only once.
...
Previously, tests were included by `app.rs` which is the entrypoint
for intgration tests, but there were also loose `.rs` files which
each count as separate test (with their own binary).
This wasn't intended and I don't know what happened there,
so now `core.rs` is the entrypoint.
2024-05-28 13:25:45 +02:00
Caleb Owens
571f16b8b2
Allow non-origin main branches to be listed
2024-05-24 15:22:34 +02:00
Caleb Owens
27f3b65b79
Fetch non-origin remotes
2024-05-24 14:58:56 +02:00
Kiril Videlov
1fbb756183
remove unused feature flag for snapshotting feature
2024-05-26 23:50:19 +02:00
Sebastian Thiel
f6dcf5d8c6
avoid assertions as they may cause the UI to 'hang' ( #2657 )
...
Panicked commands lead to timeouts, which are hard to debug unless
one sees the panic information in the log.
2024-05-26 08:44:55 +02:00
Kiril Videlov
762bb31dea
first stab at resurecting git sync
2024-05-25 23:07:40 +02:00
Kiril Videlov
f71b76ccb4
Merge pull request #3859 from Byron/win-tempfile
...
minor Windows adjustments
2024-05-25 22:08:32 +02:00
Kiril Videlov
bf3611fefa
feat: Add support for trailers with newlines
...
Escaping the newlines since the tailers are new line delimited. This is relevant when storing things like commit messages
2024-05-25 21:03:14 +02:00
Sebastian Thiel
73c21f2e42
provide more information in watcher-related errors
...
related to https://github.com/gitbutlerapp/gitbutler/issues/2657#issuecomment-2131307753
It turns out that the UI triggers `set_project_active()`, and then moves on and emits more
commands, some of which depend on a watcher being present.
The UI could wait, but even if it does the 'endless spinner' happens.
2024-05-25 20:35:40 +02:00
Sebastian Thiel
f59268fb25
Allow local overrides for the target triple of production windows builds.
...
The use-case is somewhat specific as it allows developers to do:
```
export TRIPLE_OVERRIDE=x86_64-pc-windows-msvc
```
and build the binary as x86 even on an ARM VM.
The reason ARM builds don't work natively is the `win32` crate,
which simply doesn't work there.
It could be another step to replace it with something that does
to get ARM builds, but probably that will only happen once
there is demand for native ARM windows builds.
2024-05-25 15:05:43 +02:00
Sebastian Thiel
a176bf04cf
remove Windows experiment ( #3601 )
...
The sync-all didn't do anything, and one would still run into locked
files.
2024-05-25 09:10:11 +02:00
Sebastian Thiel
9245e3458f
now_since_unix_epoch_ms
now uses negative dates for times pre Unix-epoch
2024-05-25 07:45:18 +02:00
Sebastian Thiel
2ed708b298
remove chrono which was only used for 'now in milliseconds, relative to UNIX epoch'
2024-05-24 21:38:11 +02:00
Kiril Videlov
623500a25e
remove unsed branch from implementation
2024-05-24 20:29:31 +02:00
Kiril Videlov
319550d7b5
Merge pull request #3850 from Byron/review-and-refactor
...
Watcher adjustments
2024-05-24 16:38:18 +02:00
Sebastian Thiel
e68b789a32
remove unused methods in FileId
map, and revert to what seemed functional.
...
Previously, roots were always empty and it was unclear what the purpose
of the customization was.
It's probably best to re-add it along with a test maybe.
2024-05-24 16:21:26 +02:00
Sebastian Thiel
cdf508e04c
Show what changed to get the version we currently have
...
This reverts commit 547f2ffada
.
That way it's more obvious when looking at the history what was added
and changed.
2024-05-24 15:44:13 +02:00
Sebastian Thiel
547f2ffada
re-add original code to see what changed
2024-05-24 15:42:17 +02:00
Sebastian Thiel
6596f3956e
adapt debouncer tests with the changed codebase
2024-05-24 15:38:46 +02:00
Caleb Owens
4cae28668b
Merge branch 'master' into revert-3830-core-util-duration-updates
2024-05-24 14:20:55 +02:00
Sebastian Thiel
edd8d54950
copy tests from notify-debouncer-full
as well (verbatim)
...
While at it, remove the docs as they are referring to the original source code.
Tests should help to understand how it is supposed to work.
Note that the copy is verbatim and modifications will happen in a separate commit,
along with the necessary license declarations.
2024-05-24 13:50:03 +02:00
Sebastian Thiel
86edb4627d
reorganize watcher modules for more consistency
2024-05-24 13:28:34 +02:00
Sebastian Thiel
80b9598d5a
remove (some) unused code; minor refactor
2024-05-24 13:28:33 +02:00
Sebastian Thiel
2080b62864
add license for code taken from notify-debouncer-full
2024-05-24 13:19:37 +02:00
Sebastian Thiel
5906eb1a35
change debounce-events to trace
so they don't dominate the log
...
Ideally it's usable even in debug mode.
2024-05-24 12:41:26 +02:00
Caleb Owens
42a7c8bce4
Update Oplog State to better use SystemTime
2024-05-24 12:09:15 +02:00
Kiril Videlov
2ecee6df21
Merge pull request #3846 from gitbutlerapp/sc-fix-rebase-issue
...
Return the merge result in the case the rebase bails
2024-05-24 11:02:33 +02:00
Caleb Owens
5d723f1d91
Update comment to accuratly reflect data stored
2024-05-24 10:46:47 +02:00
Scott Chacon
c58719b77d
oops.
2024-05-24 10:45:54 +02:00
Kiril Videlov
9db262936c
Merge pull request #3845 from gitbutlerapp/update-base-branch-anyhow
...
feat: Update base branch handling to use anyhow
2024-05-24 10:44:54 +02:00
Caleb Owens
b8a1dcb2f0
Revert "Replace integer timestamps with Duration"
2024-05-24 09:40:52 +01:00
Scott Chacon
757a4690ca
return the merge result in the case the rebase bails
2024-05-24 10:38:48 +02:00
Kiril Videlov
d5ff348a21
feat: Update base branch handling to use anyhow
2024-05-24 10:31:43 +02:00
Kiril Videlov
3749bcef51
snapshot before comitting is done in two steps now
...
this way we have the commit id
2024-05-24 00:35:31 +02:00
Kiril Videlov
d25cd4535e
prepare a snapshot before restoring from a snapshot instead of after
2024-05-24 00:23:34 +02:00
Kiril Videlov
3fef7b5474
support creating snapshots in 2 steps - prepare and commit
...
This allows us to create a snapshot (write the full trees state) first, perform some operations, i.e. the action taken by the user, and then finally commit the oplog.
In some cases we wanna skip comitting the oplog entry if the action done by the user fails. In some cases we might wanna save the error value as snapshot metadata.
2024-05-24 00:16:40 +02:00
Kiril Videlov
879005ae20
check lines since snapshot for all dirty branches
...
This is needed because new changes to a file may be locked to a branch which is not the "default" one
2024-05-23 22:37:10 +02:00
Kiril Videlov
db4bb914cc
improve auto snapshotting check performance
2024-05-23 22:17:46 +02:00
Kiril Videlov
c2a5014ed0
oplog state persists timestamp of last snapshot
2024-05-23 22:17:46 +02:00
Mattias Granlund
3096a23098
run cargo fmt
2024-05-23 15:59:43 +02:00
Scott Chacon
6ccb52bd63
whoops
2024-05-23 15:59:43 +02:00
Scott Chacon
7d6c36f4de
refactor: Replace manual rebase with cherry-rebase function.
2024-05-23 15:59:43 +02:00
Caleb Owens
983b2a3101
Merged origin/master into core-util-duration-updates
2024-05-23 14:26:28 +02:00
Caleb Owens
c2a1f6a7e7
Fix various tests
2024-05-23 14:26:16 +02:00
Kiril Videlov
2339be4551
Merge pull request #3827 from Byron/watcher-performance
2024-05-23 14:10:04 +02:00
Caleb Owens
d6cde8d722
Update comment to no longer say seconds
2024-05-23 14:09:27 +02:00
Caleb Owens
b81151c77d
Rename serializer
2024-05-23 14:09:20 +02:00
Caleb Owens
4a7e5f48dd
Merge origin/master into core-util-duration-updates
2024-05-23 14:04:54 +02:00
Caleb Owens
d55260c96a
Use Duration rather than various integer times for time
2024-05-23 14:02:48 +02:00
Kiril Videlov
c7aaa1a6b6
fix oplog test
2024-05-23 13:40:53 +02:00
Sebastian Thiel
850045e9d3
Allow to watch multiple directories in case of special setups
...
Like worktrees - these could work now from a watchers perspective.
2024-05-23 13:04:02 +02:00
Sebastian Thiel
9ad010bd0f
Assure we fail gracefully git-dir and worktree-dir are unusual
...
This could be supported, but would require more changes to get right.
For now, fail gracefully instead of failing strangely because we don't
watch everything that needs watching.
2024-05-23 12:55:45 +02:00
Kiril Videlov
1312813051
move snapshot MoveCommit before the operation
2024-05-23 11:59:26 +02:00
Kiril Videlov
55da2e550e
move snapshot UpdateCommitMessage before the operation
2024-05-23 11:58:13 +02:00
Kiril Videlov
7ab0bbb989
move snapshot SquashCommit before the operation
2024-05-23 11:57:34 +02:00
Kiril Videlov
72cdec8c93
move snapshot CherryPick before the operation
2024-05-23 11:56:52 +02:00
Kiril Videlov
e0584534e5
move snapshot UndoCommit before the operation
2024-05-23 11:54:46 +02:00
Kiril Videlov
05039a2bbb
move snapshot ReorderCommit before the operation
2024-05-23 11:54:03 +02:00
Kiril Videlov
ff04bc0a59
move snapshot InsertBlankCommit before the operation
2024-05-23 11:53:16 +02:00
Kiril Videlov
168a218ebe
move snapshot MoveCommitFile before the operation
2024-05-23 11:52:27 +02:00
Kiril Videlov
f514ec752c
move snapshot AmendCommit before the operation
2024-05-23 11:51:18 +02:00
Kiril Videlov
7944fb4558
move snapshot DiscardFile before the operation
2024-05-23 11:50:34 +02:00
Kiril Videlov
6574a805a8
move snapshot DiscardHunk before the operation
2024-05-23 11:50:06 +02:00
Kiril Videlov
a418f22e23
move snapshot UpdateWorkspaceBase before the operation
2024-05-23 11:49:34 +02:00