Sebastian Thiel
b7c38e4f33
fix assumption about branch identity
...
It's possible for virtual branches to have the same 'identity' as
the target branch, yet they should be listed.
2024-08-01 09:24:35 +02:00
Kiril Videlov
917a46c2ce
remove unnecessary method from RepoActionsExt
2024-07-31 21:16:38 +02:00
Sebastian Thiel
2d82b6e038
more tests specific to how branches are discovered
2024-07-31 19:44:00 +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
Caleb Owens
09de80f6f0
Mergy merge
2024-07-31 13:11:02 +02:00
Kiril Videlov
83679206cd
separate syncing of oplog from regular refs
2024-07-30 21:29:54 +02:00
Mattias Granlund
b676115b11
Always create new commit in get_workspace_head
...
- so we can safely recreate the integration commit
2024-07-30 18:09:07 +01:00
Mattias Granlund
11f0063f18
Remove test cases that do not apply
...
To list virtual branches we should require a base branch to be set.
2024-07-30 18:09:07 +01:00
Mattias Granlund
152b14c226
Remove now unused target_commit function
2024-07-30 18:09:07 +01:00
Mattias Granlund
1e518a3d78
Use octopus commit for creating gitbutler/integration
2024-07-30 18:09:07 +01:00
Caleb Owens
e53c11a477
introduce last commiter field, use jsdoc, add type transforms
2024-07-30 16:42:20 +02:00
Caleb Owens
4563ddb995
Fix gitbutler/integration nuking itself
2024-07-29 19:22:04 +02:00
Sebastian Thiel
9113105413
gitbutler-git
now specifies the minimum required rustc version. (#4514 )
...
That way, the error message will be clear and it's more obvious how to overcome
issues related to older-than-needed compiler versions.
2024-07-29 17:02:06 +02:00
Caleb Owens
742d6bc4d5
Use operating modes in watcher to decide whether to perform operations
2024-07-29 13:38:31 +02:00
Caleb Owens
2d61cae43a
Introduce operating modes
2024-07-29 13:19:38 +02:00
Caleb Owens
d37dcefdf5
Merge pull request #4523 from gitbutlerapp/Boosting-my-contribution-score
...
Boosting my contribution score
2024-07-29 11:18:58 +02:00
Caleb Owens
6f4a190464
project_repo -> ctx
2024-07-29 11:14:02 +02:00
Caleb Owens
21bad4f30f
repo -> repository
2024-07-29 11:13:25 +02:00
Nico Domino
45d340ef37
fix: nightly build ( #4522 )
2024-07-29 08:49:22 +00:00
Caleb Owens
f4569ff4da
Yes Kiril, I know its an abrv., but its consistent with what Byron started
2024-07-29 10:46:17 +02:00
Caleb Owens
366ccfecdf
Rename ProjectRepository to CommandContext
2024-07-29 10:43:18 +02:00
Mattias Granlund
974e60aefc
Fix branch reordering
...
- move branches into their own div
- make only one update request
2024-07-29 01:07:06 +01:00
Kiril Videlov
9d04c08528
add branch listing details api
...
this allows us to paginate the expensive bit of the API, like getting the lines added / removed
2024-07-28 22:19:30 +02:00
Sebastian Thiel
39099ba41c
run the nightly cargo fmt
with pnpm fmt
...
This also optimizes imports/uses, which is done only occasionally.
2024-07-28 21:02:40 +02:00
Sebastian Thiel
9e236e3469
remove async
except for in gitbutler-git
...
The reason is that it's unclear if maybe it's there for a good reason,
and I don't want to break the complex code in there.
2024-07-28 20:47:35 +02:00
Kiril Videlov
3033c7e7f5
order branch listing by last modified
...
also fixes an error in last modified computation
2024-07-28 19:35:54 +02:00
Kiril Videlov
2d0fa99452
Merge pull request #4509 from Byron/git2-to-gix
2024-07-28 17:34:42 +02:00
Sebastian Thiel
7c371e5dd4
More tests to understand more about the current branch-listing.
...
This also needs the ability to create commits.
Also experiment with `async` tauri commands, but without actually making
them `async` - nothing actually is so why pretend?
Further, assure we get the correct author and committer which helps it
pick up the overridden author information when creating a commit.
2024-07-28 17:12:23 +02:00
Sebastian Thiel
282519eca5
add ability to create add projects in CLI and create vbranches
...
This allows actual GitButler setups and more complex tests, which
are also added here.
2024-07-28 10:45:18 +02:00
Sebastian Thiel
5cdbadce4f
refactor CLI to make it easier to add new commands.
...
Also, remove the pager as there seems to be no need for it just yet,
one day it can probably be added when configured neatly.
2024-07-27 21:04:42 +02:00
Sebastian Thiel
093795bd0b
first simple test for list_branches
and basic read-only test framework
2024-07-27 19:14:15 +02:00
Kiril Videlov
bb826edf94
remove the vec of local branch entries from branch data
...
It is no longer the case that the same logical branch would have multiple trees
2024-07-27 17:13:43 +02:00
Kiril Videlov
baf754aa07
Merge pull request #4507 from Byron/stable-on-unix
...
avoid nightly compiler on unix
2024-07-27 15:43:35 +02:00
Sebastian Thiel
ad3e15dae4
Avoid using nightly by default.
...
Instead, use it only where needed, which at this time is Windows
for some nightly-only access to file-descriptors.
2024-07-27 14:35:26 +02:00
Nico Domino
1ced81fd06
fix: cleanup repo organisation ( #4503 )
2024-07-27 13:29:32 +02:00
Kiril Videlov
874710e221
Add todo comment for branch listing
2024-07-27 12:17:00 +02:00
Kiril Videlov
19cf35698a
fix lint
2024-07-27 11:32:55 +02:00
Kiril Videlov
ef6a4c71ce
update the definition of own_branch
2024-07-27 11:24:55 +02:00
Kiril Videlov
099a2159d1
do less work when only own branches are returned
2024-07-27 10:33:10 +02:00
Kiril Videlov
dd3ec7ddcc
remote expensive parts of branch listing
2024-07-26 14:22:22 +02:00
Kiril Videlov
c7a8ef99c8
branch listing - allow filtering
...
fix matching
2024-07-26 15:00:08 +02:00
Kiril Videlov
c2fafb35ff
handle the case of maaaany branches
2024-07-25 21:28:52 +02:00
Kiril Videlov
7e482437a1
HEAD is not of interest when listing refs
2024-07-25 21:08:03 +02:00
Kiril Videlov
7e660782ad
update docs
2024-07-25 21:03:28 +02:00
Kiril Videlov
116de17c0c
fix the identity detection for Virtual branches
2024-07-25 20:57:18 +02:00
Kiril Videlov
d7f19e5633
revert back to git2 for branch listing
2024-07-25 20:30:41 +02:00
Kiril Videlov
b47530af3a
Merged origin/master into new branch list api
2024-07-25 19:29:26 +02:00
Kiril Videlov
69b7aa3d8a
refactor - move given_name_for_branch from the context to an extension on git2::Reference
2024-07-25 19:29:13 +02:00
Nico Domino
bce53ba383
feat: move @gitbutler/cloud into monorepo ( #4494 )
2024-07-25 15:53:28 +00:00
Kiril Videlov
3afabc2a30
merge conflict fix
2024-07-25 16:34:18 +02:00
GitButler
62f0712399
GitButler WIP Commit
2024-07-25 16:32:39 +02:00
Kiril Videlov
970c193696
fix an incorrect assumption about gix reference remotes work
2024-07-25 15:49:44 +02:00
Caleb Owens
7a6c7472a4
Always overwrite local references
2024-07-25 15:49:22 +02:00
Kiril Videlov
6eea8d2993
trying to get branch remote name
2024-07-25 15:36:16 +02:00
Caleb Owens
2f54e51a33
Don't create unrequired wip commits
2024-07-25 15:25:51 +02:00
Caleb Owens
c1c5d88303
Specify the correct branch to be the upstream
...
asdf
2024-07-25 15:11:07 +02:00
Kiril Videlov
e5729fe56d
use the correct oxide api for getting the branch given name
2024-07-25 14:54:21 +02:00
Caleb Owens
2540642aaa
Update context spelling
2024-07-25 14:20:20 +02:00
Caleb Owens
c6badd9f3e
Update sidebar grouping of branches
2024-07-25 14:07:21 +02:00
Kiril Videlov
a0c724077a
handle the case when a branch is only a virtual branch and a remote is not yet set
2024-07-25 13:53:02 +02:00
Kiril Videlov
5147638d74
avoids a gix panic with symbolic references
2024-07-24 23:29:57 +02:00
Kiril Videlov
187a3c22fe
create a tauri commant for the new branch listing
2024-07-24 22:51:14 +02:00
Kiril Videlov
d0545a219e
implement branch listings stats calculation
2024-07-24 15:53:49 +02:00
Kiril Videlov
bbd3aea3d0
reimplement with gitoxide
2024-07-23 17:33:28 +02:00
Kiril Videlov
4e4326d42b
remove unnecessary branch reference chack
...
We already had that info, use an enum variant to encode it
2024-07-23 15:48:37 +02:00
Kiril Videlov
a3b865a7f4
implement list branches
2024-07-23 10:45:16 +02:00
Kiril Videlov
0863e3b68d
New branch listing API - create types
2024-07-22 20:46:38 +02:00
Kiril Videlov
d8a1b4bc6b
get_workspace_head exit early when there are no applied branches
...
Avoids erroring out
2024-07-22 11:25:02 +02:00
Kiril Videlov
54ae0cf9e8
more possible mitigations for the "failed to apply" problemt related to merge conflicts
2024-07-21 22:30:24 +02:00
Kiril Videlov
581a793773
possible mitigation for the case when a conflicting branch is incorrectly not unapplied base update
2024-07-21 22:04:46 +02:00
Kiril Videlov
ea4f47da1b
get_applied_status returns VirtualBranchFiles instead of a tuple of path and hunks
2024-07-21 20:12:54 +02:00
Kiril Videlov
c25e48877b
move hunk related functions and structs to a module
2024-07-21 18:22:50 +02:00
Kiril Videlov
c2d135872a
rename files module to singular for consistency
2024-07-21 18:09:15 +02:00
Kiril Videlov
880ac13f21
move commit related functions and struct to a module
2024-07-21 18:06:52 +02:00
Kiril Videlov
6e27756098
move file related operations out of virtual.rs
2024-07-21 17:59:17 +02:00
Kiril Videlov
0f00f0425a
move tree writing out of virtual branch actions crate
2024-07-21 16:15:41 +02:00
Kiril Videlov
38e01c931c
rename tree writer functions to be actually descriptive of what they do
2024-07-21 15:59:30 +02:00
Kiril Videlov
9b9bd0b2e8
make virtual.rs functions operate on VirtualBranchHunk
...
Instead of the Hunk type from gitbutler_diff
2024-07-21 15:38:46 +02:00
Kiril Videlov
63863f9de5
Merge pull request #4452 from Byron/fix-4389
...
fix 4389
2024-07-20 23:12:07 +02:00
Kiril Videlov
8bfd897579
rename new_compute_locks function
2024-07-20 23:01:50 +02:00
Kiril Videlov
591552f625
get_applied_status now returns a more clear struct
2024-07-20 23:00:06 +02:00
Sebastian Thiel
af4c70fbbc
propagate fetch-errors explicitly to prevent silent failures ( #4389 )
...
However, some tuning might be desired to prevent showing anything if background-fetches fail,
which might be desirable after all as they don't seem to run with modals enabled.
Also perform minor refactors while at it.
2024-07-20 22:38:25 +02:00
Kiril Videlov
246dd9c379
move get_applied_status to separate module
2024-07-20 22:17:31 +02:00
Kiril Videlov
587915227d
remove redundant function get_status_by_branch
2024-07-20 22:01:46 +02:00
Kiril Videlov
27561fa7b8
simplify get_applied_status function signature
2024-07-20 21:57:45 +02:00
Kiril Videlov
84fda3838a
simplify get_workspace_head signature
2024-07-20 21:48:04 +02:00
Kiril Videlov
4125dcef3b
get remove vbranches list as function parameter
2024-07-20 21:44:20 +02:00
Kiril Videlov
e41ff19dc0
remove commented out code
2024-07-20 21:31:52 +02:00
Kiril Videlov
0e9b8c2957
fixes a situation in which listing of snapshots fails
2024-07-20 15:51:46 +02:00
Kiril Videlov
ea5079b723
oplog - get a workdir tree in a safe manner
2024-07-20 14:31:43 +02:00
Kiril Videlov
b7e2f60b89
remove references to virtual branch controller from event handler
...
After recent refactors, this state is useless
2024-07-20 13:44:03 +02:00
Kiril Videlov
21e7953ac1
Merge pull request #4442 from Byron/optimize-one
...
optimize `is_commit_integrated()`
2024-07-20 13:35:49 +02:00
Kiril Videlov
603df1c998
Merge pull request #4446 from gitbutlerapp/error-codes-for-commit-failures
...
Adds error codes for commit failures
2024-07-20 13:18:18 +02:00
Kiril Videlov
5d56427f83
Adds error codes for commit failures
...
This will helps the UI better understand why a commit operation may have failed
2024-07-20 12:54:48 +02:00
Sebastian Thiel
ea37a387b4
optimize is_commit_integrated()
...
- do not repeatedly optain the same state, but cache it
- when doing a merge-check, keep temporary objects in memory only.
2024-07-19 11:14:19 +02:00
dependabot[bot]
8936cced4e
Bump gix-path from 0.10.8 to 0.10.9 in the cargo group
...
Bumps the cargo group with 1 update: [gix-path](https://github.com/Byron/gitoxide ).
Updates `gix-path` from 0.10.8 to 0.10.9
- [Release notes](https://github.com/Byron/gitoxide/releases )
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md )
- [Commits](https://github.com/Byron/gitoxide/compare/gix-path-v0.10.8...gix-path-v0.10.9 )
---
updated-dependencies:
- dependency-name: gix-path
dependency-type: direct:production
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-19 08:56:28 +00:00
Sebastian Thiel
ddfd6b95eb
conflicts::mark()
with newline check
...
Error early, instead of having dubious issues later.
2024-07-19 10:44:12 +02:00
Sebastian Thiel
0fbfa141b4
Don't touch disk once per path to conflict::resolve()
multiple of them
2024-07-19 10:44:12 +02:00
Sebastian Thiel
5946c4ca9a
conflict::*()
functions don't impose UTF-8 on paths
...
That way it's compatible to more kinds of paths, on more filesystem.
It assumes that the content of the `conflict` file is never moved
across platforms.
2024-07-19 10:44:12 +02:00
Pavel Laptev
efb5c13725
refactor: Normalize branch name by replacing invalid characters with hyphens.
2024-07-18 14:32:30 +02:00
Kiril Videlov
6101c5c66f
move hunk and diff code to a separate crate, out of the branch one
2024-07-17 20:16:48 +02:00
Kiril Videlov
e6ccf764ee
supresss clippy warning about type complexity
2024-07-17 18:48:45 +02:00
Kiril Videlov
d5fffbd4ac
move HunkLock struct to branch actions crate
2024-07-17 18:30:23 +02:00
Kiril Videlov
5d74440d4c
remove lock attribute from diff hunk structs
2024-07-17 18:23:49 +02:00
Kiril Videlov
9eeb47b63f
get_applied_status returns locks
2024-07-17 12:01:50 +02:00
Kiril Videlov
3ad6b3fd10
Merge pull request #4409 from gitbutlerapp/dependabot/cargo/rust-updates-9e51e1549e
...
Bump the rust-updates group across 1 directory with 8 updates
2024-07-16 22:14:28 +02:00
Kiril Videlov
eed5643569
Merge pull request #4410 from Byron/lock-upgrades
...
clearer read-write separation
2024-07-16 22:14:16 +02:00
Caleb Owens
b5d2c8a54f
Merge pull request #4415 from gitbutlerapp/update-svelte
...
Fix up branches list
2024-07-16 19:48:03 +02:00
Caleb Owens
90d1465e5d
Fix up branches list
2024-07-16 19:39:46 +02:00
Sebastian Thiel
4526006bf9
Show that not all users of get_applied_status
need write permissions...
...
...according to tests.
2024-07-16 17:33:53 +02:00
dependabot[bot]
cdafe5bc2c
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 |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde ) | `1.0.203` | `1.0.204` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.61` | `1.0.62` |
| [console-subscriber](https://github.com/tokio-rs/console ) | `0.2.0` | `0.3.0` |
| [open](https://github.com/Byron/open-rs ) | `5.2.0` | `5.3.0` |
| [sysinfo](https://github.com/GuillaumeGomez/sysinfo ) | `0.30.12` | `0.30.13` |
| [rstest](https://github.com/la10736/rstest ) | `0.20.0` | `0.21.0` |
| [clap](https://github.com/clap-rs/clap ) | `4.5.8` | `4.5.9` |
| [diffy](https://github.com/bmwill/diffy ) | `0.3.0` | `0.4.0` |
Updates `serde` from 1.0.203 to 1.0.204
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204 )
Updates `thiserror` from 1.0.61 to 1.0.62
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.61...1.0.62 )
Updates `console-subscriber` from 0.2.0 to 0.3.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.2.0...console-subscriber-v0.3.0 )
Updates `open` from 5.2.0 to 5.3.0
- [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.2.0...v5.3.0 )
Updates `sysinfo` from 0.30.12 to 0.30.13
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md )
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits/v0.30.13 )
Updates `rstest` from 0.20.0 to 0.21.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.20.0...v0.21.0 )
Updates `clap` from 4.5.8 to 4.5.9
- [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.8...v4.5.9 )
Updates `diffy` from 0.3.0 to 0.4.0
- [Changelog](https://github.com/bmwill/diffy/blob/master/CHANGELOG.md )
- [Commits](https://github.com/bmwill/diffy/commits )
---
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: console-subscriber
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: rust-updates
- dependency-name: open
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
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: diffy
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: rust-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-16 15:22:10 +00:00
Kiril Videlov
cc8d7c9206
upgrade version of the windows crate
2024-07-16 16:48:42 +02:00
Kiril Videlov
2f06fcb7cf
upgrade mock_instant version
2024-07-16 15:51:15 +02:00
Pavel Laptev
b888fbc834
normilize-branch-name-update ( #4392 )
...
* refactor: Normalized branch name handling
* Refactor: use only one normalize function (rust)
* Deletion: unused `normalizeBranchName` function
* Update lib.rs
* Changed test to reflect new functionality
---------
Co-authored-by: Caleb Owens <caleb@gitbutler.com>
2024-07-16 11:23:09 +02:00
Kiril Videlov
fcce329118
Merge pull request #4399 from gitbutlerapp/Fix-for-the-something-went-wrong-situation
...
Fix for the "something went wrong" situation
2024-07-16 10:51:15 +02:00
Nico Domino
bc8d00bb88
fix: update wp.com csp to wildcard subdomain ( #4397 )
2024-07-16 08:35:27 +00:00
Kiril Videlov
b9c26df9a1
indicate when a hunk is poisoned
...
This means that the hunk is 'locked/depends on' multiple branches, and because of this, it cannot be manipulated
2024-07-16 10:34:32 +02:00
Kiril Videlov
dac6c118e0
dont explode when a patch failed to apply
...
This condition arises when a hunk in fact depends on hunks from two other commits from two separate branches (i.e. it's a hunk that fuses with both)
2024-07-16 10:33:18 +02:00
Kiril Videlov
d6ec849f5e
let hunk locking discover all locks
2024-07-16 10:17:07 +02:00
Nico Domino
879746c665
feat: add io.wp.com
to img-src
CSP for gravatar / auth0 fallback avatars ( #4396 )
2024-07-16 08:15:38 +00:00
Kiril Videlov
8ccd8d511e
Merge pull request #4349 from Byron/refactor
...
refactor and PoC for worktree mutability handling
2024-07-15 23:02:01 +02:00
Sebastian Thiel
613a773c77
fix remaining tests that depend on the auto-creation of vbranches
2024-07-15 22:36:44 +02:00
Sebastian Thiel
822fd92b9d
Enforce locking by making locks part of the public oplog
API.
...
This way, all methods that care about the `oplog` also have to
care about choosing the right lock.
2024-07-15 21:09:33 +02:00
Mattias Granlund
6692acd261
Simplify SystemEditor readable
2024-07-15 14:34:55 +01:00
Sebastian Thiel
09ca2d0284
enforce in-process-synchronization during worktree updates and prolonged reads in oplog
...
That way it's assured that reads and writes don't intersect, but assure we only
hold such lock for the shortest amount of time for reads and and for the
full duration of writes.
2024-07-15 14:21:15 +02:00
Sebastian Thiel
3e79238e7f
assure conflicts::mark()
writes its file atomically
...
That way it can't be observed half-written, or remain in a half-written
state in case of crash.
2024-07-15 08:20:06 +02:00
Sebastian Thiel
b3b87b34a5
reduce tauri
state
...
This is in preparation for making operations that access the filesystems
less stateful, which in turn makes it less akward to identify writing
methods with `&mut` lateron.
This includes accepting that all we really need is a single directory
to generate everything else we need on the fly. This simplifies commands.
For good measure, this also simplifies imports of smaller crates that are
involved.
2024-07-14 22:27:53 +02:00
Sebastian Thiel
4a7b63a56e
various refactors in main functions called during project load
...
* use `ctx` as name instead of `project_repository` to make lines shorter
and more readable. This could be done everywhere once the type-name changes
as well.
* Where possible, avoid using `&self` for `VirtualBranchActions` as there is no state.
For now I avoided to remove its usage as field in the filesystem monitor.
* Use a more modern way to use state in `tauri` commands.
* Add the `Ext` suffix to what clearly is extension traits.
2024-07-14 21:32:55 +02:00
Sebastian Thiel
f48d0e2746
adapt to changes in gitbutler-branch
crate
2024-07-14 21:32:55 +02:00
Sebastian Thiel
85b4e564cd
simplify module paths of gitbutler-branch
crate
2024-07-14 21:32:55 +02:00
Sebastian Thiel
4501b5dd51
minimize the public API of the branch
crate
...
Only keep public what needs to be public right now, which always
helps with refactoring later.
2024-07-14 21:32:55 +02:00
Sebastian Thiel
4805f6e7e7
adapt to changes in gitbutler-branch-actions
2024-07-14 21:32:55 +02:00
Sebastian Thiel
5e408f6b2d
Assure a single path to an item (struct, fn)
...
Also, simplify paths and optimize them (to some extend) to seem
non-redundant when `use`ing them.
2024-07-14 21:32:55 +02:00
Sebastian Thiel
0079f2bcbe
minimize the public API of gitbutler-branch-actions
crate.
...
Also avoid private traits where functions would be easier to use.
2024-07-14 21:32:54 +02:00
Sebastian Thiel
6fb6201ab9
assure docs can be built without warnings by default.
...
It's a good way to review import paths and the public API.
2024-07-14 21:32:49 +02:00
Sebastian Thiel
eaa18da9d0
Make the ProjectSelector
multi-window aware
...
That way it will not allow to open a project if it's known to be open already.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
38f800d877
assure the multi-window lock actually works
...
This includes the UI is responding to issues.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
24b8bdaa86
Open new existing projects with Alt + click
in project popup.
...
This is intentionally non-obvious for now while it's new.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
c310942b12
keep track of state per window
...
This allows multiple application windows to be opened and managed.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
ccd6a6fe0d
let UI trigger necessary updates on addition and removal
2024-07-12 15:19:09 +02:00
Sebastian Thiel
00303704f4
add project-lock to generalized state
...
This means the current watcher also includes a file-lock for the current project.
Later this can be generalized to be per-window.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
4d2a153aed
Use extractors for project-commands
...
That way, it's clearer what facilities or global state
are used when invoking a particular command.
2024-07-12 15:19:09 +02:00
Sebastian Thiel
c51be90aea
Merge pull request #4338 from gitbutlerapp/Fix-double-remote-fetch
...
Fix double remote fetch
2024-07-12 10:37:34 +02:00
Sebastian Thiel
5f4e0adb28
remove now unused default_target()
function
2024-07-12 10:30:56 +02:00
Mattias Granlund
58d3cd5aff
Fix double fetching of remote
...
- all remotes already fetched in existing iter/map
2024-07-12 00:38:46 +01:00
Mattias Granlund
f832e0b83a
Fix double loading of things on open
...
- fetch event is already in use by front end for reloading
2024-07-12 01:30:04 +03:00
Caleb Owens
c982e78567
Merge pull request #4328 from gitbutlerapp/split-branch-manager-into-seprate-traits
...
Use impls rather than private traits
2024-07-10 17:50:35 +02:00
Caleb Owens
38d54e3eaf
Use impls rather than private traits
2024-07-10 17:42:05 +02:00
Caleb Owens
b732bdf622
Merge pull request #4326 from gitbutlerapp/split-branch-manager-into-seprate-traits
...
Split branch manager into seperate traits
2024-07-10 17:33:04 +02:00
Caleb Owens
482a176333
Added some high level docs
2024-07-10 17:25:48 +02:00
Caleb Owens
ca4cdfe968
Split branch manager into seperate traits
2024-07-10 17:23:50 +02:00
Kiril Videlov
d9d20d20e9
fixes a regression created during refactoring
2024-07-10 17:23:07 +02:00
Kiril Videlov
87f956d871
move ReferenceName tagged string to gitbutler-reference crate
...
gitbutler-reference is where ReferenceName belongs. There are other thing in this crate that are not nice, but let's clean those up!
2024-07-10 16:48:59 +02:00
Kiril Videlov
d010d56044
Merge pull request #4324 from gitbutlerapp/move-branch-state-in-branch-crate
...
move branch state into the gitbutler-branch crate
2024-07-10 16:27:01 +02:00
Kiril Videlov
e92fe44fa1
move branch state into the gitbutler-branch crate
...
Further to the move - the VirtualBranchesExt trait creates a dependency towards gitbutler-project. The gitubler-branch crate doesn't have such dependency so i deemed it undesirable to introduce it just for a convinience method.
(Separately added an extention in gitbutler-virtual-actions since it already depends on project and to create a smaller diff)
2024-07-10 16:18:34 +02:00
Nico Domino
43f60f94c8
feat: extract svelte build into own GHA job ( #4321 )
2024-07-10 13:45:18 +00:00
Kiril Videlov
c8658b9a23
rename gitbutler-virtual to gitbutler-branch-actions
...
This is to establish a patter of which crates represent a higher level logic
2024-07-10 14:49:48 +02:00
Kiril Videlov
da67580c80
Rename VirtualBrancesAccess to _Ext since it's the convention
...
After discussing it, seems like a better way of naming this is to use the Ext convention
2024-07-10 12:54:22 +02:00
Kiril Videlov
ae6dc38ac7
rename virtual branches controller to actions
2024-07-10 12:11:36 +02:00
Kiril Videlov
a06570deb6
make the virtual branches controller stateless
2024-07-10 12:07:11 +02:00
Caleb Owens
b49b23c2c2
Update other logic TODO: dedup logic
2024-07-09 23:31:49 +02:00
Kiril Videlov
5a0072db53
Merge pull request #4313 from gitbutlerapp/fix-migration-cdoe
...
Fix migration code
2024-07-09 23:05:10 +02:00
Kiril Videlov
be55ae3dc6
fixes somethig??
2024-07-09 22:40:41 +02:00
Caleb Owens
7127bd9c01
Update filtered searches to use is_old_applied metric
2024-07-09 22:31:38 +02:00
Caleb Owens
9f13291edb
Fix migration code
2024-07-09 22:21:05 +02:00
Sebastian Thiel
0b735b58f3
avoid proxying author-images in favor to letting the frontend do the caching ( #4007 )
...
The frontend should be better at this due to being a browser engine, which can naturally
handle slow network links and firewalls.
Caching should also be better and more consistent as cache-related headers are respected.
This should speed up display times of new branches significantly, ideally without blocking
the UI at all.
2024-07-09 21:24:23 +02:00
Caleb Owens
c439334633
Remove old feature flag
2024-07-09 20:22:45 +02:00
Caleb Owens
44aa0ba5df
Remove old hunk locking algorythmimi
2024-07-09 20:18:37 +02:00
Caleb Owens
c4db79e789
Remove nolonger valid tests
2024-07-09 20:12:05 +02:00
Caleb Owens
9b59764db3
Split branch creation and deletion into their own home
2024-07-09 16:47:24 +02:00
Kiril Videlov
45d4d7c6e1
remove unused deps
2024-07-09 16:00:45 +02:00
Kiril Videlov
cdec47154d
remove references to gitbutler-core
2024-07-09 15:56:57 +02:00
Kiril Videlov
c95c977ce2
move windows module to tauri
...
Does this even do anything? Seems like dead code...
2024-07-09 15:44:58 +02:00
Kiril Videlov
ecc6848c07
remove duplicated files that were moved to another crate
2024-07-09 15:36:45 +02:00
Kiril Videlov
99d7b85343
move url module to a separate crate
...
this code is awful - lets nuke it asap
2024-07-09 15:29:24 +02:00
Kiril Videlov
01f3e0f0c4
extract tagged string to its own crate
2024-07-09 14:57:43 +02:00
Kiril Videlov
00354771b7
move ReferenceName type to the reference crate
2024-07-09 14:53:36 +02:00
Kiril Videlov
e4ab6262c9
move branch_ext to branch crate
2024-07-09 14:50:59 +02:00
Kiril Videlov
5c85bddccc
remove dead code
2024-07-09 14:45:17 +02:00
Kiril Videlov
db9d29b467
Rename ProjectRepo to ProjectRepository
...
This is casue some ppl dont like abbrevs
2024-07-09 13:45:04 +02:00
Kiril Videlov
b856ebf6d3
Merge pull request #4302 from gitbutlerapp/extract-more-things-out-of-core
...
extract more things out of core
2024-07-09 13:33:27 +02:00
Kiril Videlov
164ca5ed85
Merge pull request #4255 from Byron/log-retention
...
better logs
2024-07-09 13:28:40 +02:00
Kiril Videlov
5932e328ed
remove dead code
2024-07-09 13:23:06 +02:00
Kiril Videlov
a4d3680891
extract commit crate out of core
2024-07-09 13:19:49 +02:00
Kiril Videlov
9023382c78
move time module to it's own crate
2024-07-09 13:08:12 +02:00
Kiril Videlov
bf373c5d8f
move default_true type to the only place where its relevant
...
We dont really want this type to spread through the codebase
2024-07-09 13:00:26 +02:00
Kiril Videlov
3be7d600e0
move fs and storage intor separate crates
2024-07-09 12:54:08 +02:00
Caleb Owens
3142a0c298
Use rename
2024-07-09 12:50:48 +02:00
Kiril Videlov
55b8a0357b
move id module to its own crate
2024-07-09 12:39:18 +02:00
Kiril Videlov
b0440ce989
move ssh module to the only place where it's relevant
2024-07-09 12:31:15 +02:00
Kiril Videlov
25ec331791
move secret module out of core into own crate
2024-07-09 12:11:12 +02:00
Kiril Videlov
944b63c647
move serde functions into their own crate
2024-07-09 11:49:12 +02:00
Kiril Videlov
a6a6ba3ae5
fix error doctests
2024-07-09 11:40:48 +02:00
Kiril Videlov
fb862f0907
move dedup to gitbutler-virtual
...
its the only place where this is relevant
2024-07-09 11:30:29 +02:00
Kiril Videlov
262757cf39
Merge pull request #4295 from gitbutlerapp/move-err-module-to-crate
...
move error module to it's own crate
2024-07-09 11:26:05 +02:00
Kiril Videlov
989f27a0d6
move error module to it's own crate
2024-07-09 11:13:39 +02:00
Sebastian Thiel
bb880cf8a6
specifically remove log files with old name
...
This also assures that previously spilled secrets will be removed.
2024-07-09 11:10:21 +02:00
Sebastian Thiel
5f192d0e77
consistent extension for .log
files should help in reading them.
...
This might particularly be true on Windows.
Note that we don't call them `txt` to make opening them with
a specialized program easier.
2024-07-09 11:03:31 +02:00
Sebastian Thiel
b1b04adf56
assure not too many log files are retained.
...
Previously, despite `max_log_files()` configured, it would still
retain more than that, and effectively never delete any as that
would only happen on log-rotation.
Now we do it ourselves just once.
2024-07-09 10:53:16 +02:00
Sebastian Thiel
7ffb13550a
remove unused lock
module and dependency to fslock
2024-07-09 10:24:27 +02:00
Kiril Videlov
9e69806d06
fix some cargo stuff
2024-07-09 01:17:37 +02:00
Kiril Videlov
de200c8e20
move reference module from core to its own crate
2024-07-09 01:14:28 +02:00
Kiril Videlov
0b1ecf7b54
move virtual branch constatns out of the core create
2024-07-09 00:45:10 +02:00
Kiril Videlov
17b8214c5d
move target module to gitbutler-branch crate
2024-07-09 00:40:10 +02:00
Kiril Videlov
8043f0dd4e
remove unused keys module
2024-07-09 00:26:27 +02:00
Kiril Videlov
acee9ba5ab
move branch related modules to separate crate
...
Unfortunatelly diff and branch types form a cyclical dependency via the "HunkLock" type. This will have to be refactored as a followup
2024-07-09 00:10:55 +02:00
Kiril Videlov
0c9c781bd5
Renaming crate gitbutler-branch to gitbutler-virtual
...
This is more descriptive to what logic lives inside. Further, this allows for splitting up the just branch bits in a separate crate (which is currently in gitbutler-core)
2024-07-08 20:56:00 +02:00
Kiril Videlov
41ec6da226
move askpass module to repository where it is being used
2024-07-08 19:45:35 +02:00
Kiril Videlov
f965a3e4cf
move author module to the branch crate - the only place this is used
2024-07-08 19:35:49 +02:00
Kiril Videlov
82431b182e
actually remove the code that was move out
2024-07-08 19:06:04 +02:00
Kiril Videlov
e1cf6b1884
remove some unused code
2024-07-08 19:03:50 +02:00
Kiril Videlov
83a1d4a1e5
extract user as its own crate out of core
2024-07-08 18:58:29 +02:00
Kiril Videlov
f042854b1c
combine the assets proxying implementaiton in one file
...
Now it's only used in one place
2024-07-08 18:23:51 +02:00
Kiril Videlov
cdbf4d8cd3
move legacy config module out of core
2024-07-08 18:12:12 +02:00
Kiril Videlov
ba4359c7dc
fix an import oopsie
2024-07-08 17:58:56 +02:00
Kiril Videlov
ba5b9ff0ee
Merge branch 'master' into extract-project-from-core-into-its-onw-crate
2024-07-08 17:57:17 +02:00
Caleb Owens
bf9cc91d3e
No longer using commit headers other than change_id
2024-07-08 17:09:01 +02:00
Kiril Videlov
e93896621f
move project module in a separate gitbutler-project crate
2024-07-08 15:33:26 +02:00
Caleb Owens
2e8065128e
Recover old virtual branches state
2024-07-08 15:00:10 +02:00
Caleb Owens
f1ad8e6ca3
Handle the old_applied type
2024-07-08 15:00:03 +02:00
Caleb Owens
066d6d2437
Rename 'list_branches' to convey more meaning
2024-07-08 14:58:31 +02:00
Caleb Owens
54744ef78c
Remove more remnents of unapplied branches
2024-07-08 14:58:28 +02:00
Kiril Videlov
f7094fcdff
move config module to a separate gitbutler-config crate
2024-07-08 14:49:45 +02:00
Kiril Videlov
a049711472
separate sending zipped logs functionality into gitbutler-feedback crate
2024-07-08 13:52:22 +02:00
Kiril Videlov
e258710502
move ProjectRepo into its own crate
...
This type currently acts more or less like a command context that lives for the duration of the request. Regardless of if we wanna keep this pattern or not, separating it out helps us split up core
2024-07-08 13:23:03 +02:00
Kiril Videlov
306ab0bea9
move legacy credentail helper to gitbutler-repo crate
...
it's mostly used from there
2024-07-08 13:01:38 +02:00
Kiril Videlov
7ac2d3a619
move repository ext trait to gitbutler-repo crate
2024-07-08 12:21:01 +02:00
Kiril Videlov
a83a9a8ffc
remove useless stateful remotes controller
...
The same stuff can be achievecd without hoarding state
2024-07-08 10:58:16 +02:00
Kiril Videlov
f9f8addb72
move repo related commands out of the project controller
2024-07-08 10:47:37 +02:00
Kiril Videlov
7c7143a570
create new module in tauri for repo related functions
...
moving out of project
2024-07-08 10:36:06 +02:00
Kiril Videlov
f92df0cde7
move RepoActions to gitbutler-repo crate
2024-07-08 00:45:04 +02:00
Kiril Videlov
ce497ef7cd
move rebase module to a new repo crate
2024-07-08 00:27:17 +02:00
Kiril Videlov
e37f02030a
move repo syncing code to the sync crate
2024-07-08 00:09:39 +02:00
Kiril Videlov
83297de784
remove a leftover file that was moved to another crate
2024-07-07 23:49:14 +02:00
Kiril Videlov
f7ea32730f
remove unnecessary metho drom RepoActions
2024-07-07 23:37:15 +02:00
Kiril Videlov
018e550560
move remote_branches function from RepoActions to RepositoryExt
2024-07-07 23:33:58 +02:00
Kiril Videlov
e75d99aca0
remove unused functions
2024-07-07 23:26:02 +02:00
Kiril Videlov
66e8e8b91b
remove useless indirection when getting repo head
2024-07-07 23:24:45 +02:00
Kiril Videlov
c62c43ed6c
remove useless indirection when getting index size
2024-07-07 23:22:58 +02:00
Kiril Videlov
569d282700
remove dependence of projects controller towards repo actions
2024-07-07 23:19:48 +02:00
Kiril Videlov
50577f3865
remove inappropriate path function from repo actions trait
2024-07-07 23:12:43 +02:00
Kiril Videlov
6dcbb8bddb
move conflicts module to branches crate
2024-07-07 22:58:48 +02:00
Kiril Videlov
0924b506d7
remove deps towards repository actions from remotes controller
2024-07-07 22:38:33 +02:00
Kiril Videlov
ca2ffaac68
separate complex actions on Project repo in a separate trait
2024-07-07 22:28:27 +02:00
Kiril Videlov
143b3252a7
rename Repository type to ProjectRepo
...
Less misleading this way..
2024-07-07 22:09:45 +02:00
Kiril Videlov
e2bfb03fa9
remove irrelevant test
...
This test used to exercise the custom iterator that existed before
2024-07-07 21:27:09 +02:00
Kiril Videlov
00a77d9327
move branch state into a separate crate
2024-07-07 21:26:07 +02:00
Kiril Videlov
71809fc882
remove project dependency on oplog
2024-07-07 21:10:31 +02:00