This is done one-time (for now) using a nightly feature of cargo-fmt
as defined in `rustfmt-nightly.toml.`
It's planned to make this the default so imports will always be sorted.
For now it can be run manually with:
cargo +nightly fmt -- --config-path rustfmt-nightly.toml
or
pnpm rustfmtTBD
Please enter the message for your patch. Lines starting with
This is done one-time (for now) using a nightly feature of cargo-fmt
as defined in `rustfmt-nightly.toml.`
It's planned to make this the default so imports will always be sorted.
For now it can be run manually with:
cargo +nightly fmt -- --config-path rustfmt-nightly.toml
or
pnpm rustfmt
- we are moving away from using observables inside .svelte files
Refactor project service
- easier to consume with value/error stores instead of observable
The general goal is to make data globally available to components to avoid
prop drilling from the dependency root into leaf nodes. With this commit the code
now uses context for looking up branches, commits, ownership, etc.
Beyond this goal we should as a next step consider separating out pure UI
components from client specific ones. For example, `FileStatusIcons` should
not depend on a list of commits. We should also avoid activating/deactiviating
features since it is prone to breakage. We therefore need to look over how
`selectedOwnership` is made active for virtual branches, but ignored for
previewing remote branches.
Goals accomplished in this commit:
- no more prop-drilling of branch, commits, ownership
- easier to enable e.g. lock tooltip in leaf nodes
- context builder for things that are not unique by type (e.g. commits)
Goals not accomplished in this commit:
- `selectedFiles` is still passed around
- `UserSettings` needs to be changed from interface -> class
Without it, CI would have reduced performance compared to how
it worked previously. As it's wiped at the end of each run,
there is no reason to leave the added performance on the table
by not removing our own files.
Previously, tests ran in 5.7s, without cleanup, now it takes 8.5s,
a reduction by 1/3rd which is noticable (removing 15k files per
full run takes time).
When setting the GITBUTLER_TESTS_NO_CLEANUP environment variable
when running the tests, temporary directories won't be removed
anymore.
Created on the fly while perusing the test-suite.
* avoid unnecessary `test_` prefix
* move more (and previously missed) test modules to integration level
* make `dedup` crate-private to have a reason to keep the tests where they are, same with similar functions