Kiril Videlov
7a4dc32ba7
add toml state to branch and target readers
...
This allows reading to happen from either the meta git repo or the toml file
2024-03-31 23:07:44 +02:00
Kiril Videlov
04e6d2d7d7
fix test
2024-03-31 00:43:26 +01:00
Sebastian Thiel
72291ce4cb
chore: align 'app' and 'lib' crates imports.
...
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
2024-03-30 22:43:16 +01:00
Sebastian Thiel
26c39f2a3f
chore: move library from top-level to gitbutler-core
...
This better expresses what it does, and leaves the `gitbutler-app`
in the top-level where it can serve as visible entrypoint.
2024-03-30 22:39:21 +01:00
Sebastian Thiel
7941db2b2f
Revert "Merge pull request #3378 from gitbutlerapp/crates"
...
This reverts commit 423b27c11a
, reversing
changes made to b39779366f
.
2024-03-30 22:25:36 +01:00
Sebastian Thiel
47e5badbfc
chore(app): move it to crates/
to establish the new structure.
...
It is similar to `nu-shell`, which has a lot of crates by now,
which is something we probably see here as well.
2024-03-30 19:36:27 +01:00
Sebastian Thiel
2dbdc6ea99
integrate library into app
...
Note that small `commands` modules are now inlined for ease of use.
2024-03-30 15:16:11 +01:00
Sebastian Thiel
ccb8bb9d27
chore(app): no tempdir cleanup if GITBUTLER_TESTS_NO_CLEANUP is set
...
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.
2024-03-29 07:54:42 +01:00
Sebastian Thiel
2e40278ed5
fix: remove tempdirs automtically at the end of a test-run.
...
That way, they don't accumulate on developer machines.
2024-03-29 07:54:36 +01:00
Sebastian Thiel
87643cd5ce
fix: re-enable accidentally commented unit-test
2024-03-28 20:35:51 +01:00
Sebastian Thiel
bbf4d7c817
chore(app): additional minor fixes
...
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
2024-03-28 19:21:02 +01:00
Sebastian Thiel
8784e7cedd
chore(app): fix remaining TODOs and some minor cleanup
2024-03-28 10:51:26 +01:00
Sebastian Thiel
eed0fb1fbb
chore: add lib
to be able to support integration tests; separate tests
2024-03-28 09:05:54 +01:00
Josh Junon
502645eaac
move from lib+bin to bin, refactor tests into crate
2024-03-01 15:14:30 +01:00
Kiril Videlov
c83e39ec5c
update tests to reflect using the hunk context
2024-02-25 23:24:58 +01:00
Kiril Videlov
000ddeff91
chore: remove user-facing config for using diff contexts infavor of automatic migration
2024-02-25 23:24:58 +01:00
Nikita Galaiko
2a07acf46e
implement move_commit api
2024-02-19 09:21:12 +01:00
Nikita Galaiko
eb193a32fe
add TryFrom<&PathBuf> for tests
2024-02-14 17:25:39 +01:00
Kiril Videlov
90c8884bbf
chore: remove inappropriate to_lowercase() of branch names
2024-02-14 15:48:39 +01:00
Nikita Galaiko
ff8aac3d32
apply reverse hunk to unapply ownership
2024-02-06 12:48:43 +01:00
Kiril Videlov
4e33c3ce68
Remote DataDir type in favor of just PathBuf
2024-01-31 14:39:47 +01:00
Nikita Galaiko
55a2641b32
fix going back to existing default target
2024-01-30 11:31:33 +01:00
Nikita Galaiko
4fda8370a4
make sure nothing is flashed when idle
2024-01-22 15:37:42 +01:00
Nikita Galaiko
0d723554e6
handle applying branch that should become the target
2024-01-22 10:54:28 +01:00
Nikita Galaiko
9670c863c0
always explicitly mark selected_for_changes
2024-01-19 11:07:22 +01:00
Nikita Galaiko
ed1feccca3
assume integrated commits's parents are integrated
2024-01-18 12:56:10 +01:00
Nikita Galaiko
cc7102b18c
add failing test
2024-01-17 14:03:24 +01:00
Kiril Videlov
90e71e6458
use zero context hunks internally
...
Use hunks with zero context lines for virtual branch ownership. Reconstruct the context lines before returning hunks to the frontend
working on tests WIP
handle new files
cleanup comments
skip binary files
🐛 fix: add trailing newline to diff string in hunk_with_context function
handle empty diffs
fix diff header expectations
2024-01-14 23:42:34 +02:00
Nikita Galaiko
38647d20a5
refactor: is_default -> selected_for_changes
2024-01-11 14:58:57 +01:00
Nikita Galaiko
dbe83d5f2d
cargo fmt
2024-01-11 12:40:35 +01:00
Nikita Galaiko
3fd0936f54
fix: distribute hunks to the correct virtual branch based on default branch position
2024-01-11 12:37:50 +01:00
Nikita Galaiko
c376549a1f
feat: add support for setting a virtual branch as the default branch
2024-01-11 10:38:22 +01:00
Nikita Galaiko
e1ee69a348
fix integrating fully merge branch while being behind
2024-01-10 12:37:23 +01:00
Kiril Videlov
f3d93c79b6
🔨 chore: add test case for locking disjointed hunks in virtual branches
...
🔧 fix: update line range to use i32 type in create_commit test
2024-01-09 14:58:45 +01:00
Josh Junon
c5c51c9254
move packages/* into root as crates
2023-12-22 14:20:02 +01:00