Caleb Owens
b8a1dcb2f0
Revert "Replace integer timestamps with Duration"
2024-05-24 09:40:52 +01: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
Mattias Granlund
cd419eca67
Refactor how we merge in commits from branch upstream
...
- send change_id to frontend for `RemoteCommit`
- split up massive function into three
- add a couple of checks to prevent unexpected state
- rebase if force push allowed (needs toggle)
2024-05-23 10:58:59 +02:00
Scott Chacon
b0c5c07a57
some change-id based tests
2024-05-15 15:21:19 +02:00
Scott Chacon
202c551bc7
remove signing setting
2024-05-14 13:15:11 +02:00
Scott Chacon
d944cad533
merge upstream
...
temp
2024-05-14 10:25:29 +02:00
Kiril Videlov
81e948774f
fix test
2024-05-12 23:42:04 +02:00
Scott Chacon
51f9769024
sign commits with real git
...
in the strangest possible way
2024-05-07 15:15:25 +02:00
Josh Junon
dce8ead62f
use simpler virtual branch handle fetch in tests (and fix strange uncaught compilation error)
2024-05-06 20:22:40 +02:00
Scott Chacon
46fe51eeda
fix rust errors
2024-05-06 14:30:25 +02:00
Sebastian Thiel
a08e2be07e
OwnershipClaims
now allocates less
...
This is done by allowing to take (rust) ownership where internally
the item is consumed.
2024-04-26 07:08:43 +02:00
Mattias Granlund
8dd4a92622
Use empty vector instead of None
2024-04-24 08:15:01 +01:00
Mattias Granlund
055c7e7119
Use blame for hunk locking
...
- replaces commit walking with a git blame
- limited to specific hunk lines
- earliest_commit set to default target
- lock if any blame other than boundary commit
- intersection uses context lines
2024-04-24 08:15:01 +01:00
Sebastian Thiel
568d35fa90
refactor
...
- assure that `repository` can't be misused in `hunks_by_filepath()`.
- Use more obvious enumeration to describe and match on lines
- make clear that diff_lines can be a hash
- avoid multiple hashmasps if one would do
- `Hunk::hash_diff` now uses lines with terminator to be close to being a true content hash. This was probably intended by the code originally.
2024-04-21 11:35:26 +02:00
Sebastian Thiel
04bcf3b8b2
adjust Hunk::hash_diff()
to produce unique hashes based on input.
...
The input is variable and maybe empty, maybe a diff header followed
by diff-lines, and it could be an SHA1 of a binary file, which now is
hashed like any other content.
2024-04-21 11:35:26 +02:00
Sebastian Thiel
fb83dafd8b
Make using Hunk::hash
with something that's not a hash a hard error.
...
Fix all occasions where this seems to be used like this.
2024-04-21 11:35:25 +02:00
Sebastian Thiel
eb0db39387
Strongly type the hunk-hash to avoid String
, but remain compatible.
...
This change also avoids allocating for the hash, while keeping
everything else the same.
2024-04-21 11:35:25 +02:00
Kiril Videlov
ee62577012
remove gb_repository from remote
2024-04-21 09:16:14 +02:00
Kiril Videlov
6334336e7b
remove branch reader / writer
2024-04-19 23:48:11 +02:00
Kiril Videlov
86fe1e2735
remove target reader / writer
2024-04-19 23:29:13 +02:00
Kiril Videlov
442eb88eaa
rm target writer from unrelated tests
2024-04-19 23:13:27 +02:00
Kiril Videlov
01100a5407
rm gb_repository from commit
2024-04-19 22:52:17 +02:00
Kiril Videlov
f1cee4bf11
rm gb_repository from merge_virtual_branch_upstream
2024-04-19 22:49:53 +02:00
Kiril Videlov
eb1c0ca721
rm gb_repository from list_virtual_branches
2024-04-19 22:48:43 +02:00
Kiril Videlov
1240177dcf
rm gb_repository from unapply_branch
2024-04-19 22:47:13 +02:00
Kiril Videlov
749cde0112
rm gb_repository from unapply_ownership
2024-04-19 22:45:33 +02:00
Kiril Videlov
45c1342a53
rm gb_repository from apply_branch
2024-04-19 22:44:42 +02:00
Kiril Videlov
676fb0e8fa
rm gb_repository from update_gitbutler_integration
2024-04-19 22:39:46 +02:00
Kiril Videlov
b77818c31e
rm gb_repository from update_branch
2024-04-19 22:23:24 +02:00
Kiril Videlov
b1c6af328e
rm gb_repository from get_status_by_branch
2024-04-19 22:18:35 +02:00
Kiril Videlov
6dc51f4d12
rm gb_repository from is_remote_branch_mergeable
2024-04-19 22:12:37 +02:00
Kiril Videlov
2e1c46c0a6
rm gb_repository from is_virtual_branch_mergeable
2024-04-19 22:11:30 +02:00
Kiril Videlov
67a8d03254
rm gb_repository from verify branch
2024-04-19 22:09:28 +02:00
Kiril Videlov
6853f0859e
rm gb_repository param from create_virtual_branch
2024-04-19 22:05:33 +02:00
Kiril Videlov
f7f7ba992b
fix: valid ownership claims in test
2024-04-18 13:12:39 +02:00
Kiril Videlov
044f427810
rm functions for adding context lines to hunks
2024-04-17 07:23:34 +02:00
Kiril Videlov
6f0fe2afa9
rm uses_diff_context from list vbranches return
2024-04-17 07:14:43 +02:00
Mattias Granlund
b85c7e39ad
Fix improper base when calculating virtual branches
...
- no need to deal with hunks that are already committed
2024-04-16 00:09:04 +02:00
Sebastian Thiel
906bfa3cf4
use the new testsupport
crate
2024-04-09 20:45:17 +02:00
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
de181f2107
refactor: move VirtualBranchesHandle construction out of branch reader/writer
...
When the migration is complete there will be no branch/target reader/writer. For now, inject the handle
2024-03-30 23:56:33 +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