Commit Graph

6476 Commits

Author SHA1 Message Date
Sebastian Thiel
91d892882e
Deduplicate all 'write' code
GB writes files atomically and in the end it boils down to allocating bytes
and writing them all at once.

Now this capability lives in the `fs` module.
2024-04-27 16:11:27 +02:00
Kiril Videlov
415d090d37
Merge pull request #3618 from gitbutlerapp/undo-snapshots-add-types
undo snapshots - add types
2024-04-26 23:51:32 +02:00
Kiril Videlov
88c5fa249b updated ui structs for snapshots 2024-04-26 23:34:09 +02:00
Kiril Videlov
9d534b09ca
snapshots - read full commit meesage 2024-04-26 23:33:39 +02:00
Kiril Videlov
5420fc3e3c
use new snapshot types 2024-04-26 23:20:31 +02:00
Kiril Videlov
371a944e71
add types for the different kinds of snapshots
Serializing and deserializing snapshot trailers
2024-04-26 22:35:09 +02:00
Pavel Laptev
06240b3e78
CSS: Button and Tag fixes (#3616) 2024-04-26 16:08:13 +02:00
Pavel Laptev
720dbfc875
Small CSS Updates (#3615)
* badge changes

* fix branches dragging
2024-04-26 13:45:35 +02:00
Josh Junon
847f820922
Merge pull request #3613 from gitbutlerapp/mod-rs-single-file
move multi-file modules to mod.rs and single-file modules to <name>.rs
2024-04-26 12:09:39 +02:00
Josh Junon
adcba68220
move multi-file modules to mod.rs and single-file modules to <name>.rs 2024-04-26 11:56:35 +02:00
Sebastian Thiel
9ca8f45a68
Merge pull request #3597 from Byron/copy-less
use iterators and avoid copies
2024-04-26 07:21:30 +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
Sebastian Thiel
6c90381bcf
Use iterators for transformation, and avoid copies by default. 2024-04-26 07:08:41 +02:00
Sebastian Thiel
9dddd77899
Make it more obvious to devs how to make core tests pass.
Now a binary is required which might not always be present, nor is
it created as pre-requisite of the test.

Until that is the case, say how this can be fixed.
2024-04-26 07:07:44 +02:00
Mattias Granlund
a91153aff3 Fix lock tooltip closure shadowing commit variable 2024-04-26 00:06:01 +02:00
Mattias Granlund
311a582a8c Minimise range in double lock test
todo: figure out why we can't use only three lines in this test
2024-04-26 00:06:01 +02:00
Mattias Granlund
c5c2df1b93 Surface warning if hunk locked to multiple branches
- now returning `HunkLock` to front end
- detect if locked to more than one branch and warn user
2024-04-26 00:06:01 +02:00
Sebastian Thiel
ff44a80e74
Merge pull request #3607 from Byron/win-fixes
Revert 74eb7bd3 as debounce-timing has no effect (#3601)
2024-04-25 22:07:37 +02:00
Kiril Videlov
b1d03995b7
Merge pull request #3608 from gitbutlerapp/implement-mvp-of-undo-stack
implement mvp of undo stack
2024-04-25 22:00:34 +02:00
Kiril Videlov
fd1ac5d65b
improved snapshot labels 2024-04-25 21:44:30 +02:00
Kiril Videlov
33859c89ef
adds some documentation 2024-04-25 21:09:02 +02:00
Kiril Videlov
bedc918b84
simplify reflog reference setting 2024-04-25 20:51:24 +02:00
Kiril Videlov
24a357e3c7 add some basic UI for the undo
activated with Cmd+shift+H
2024-04-25 19:23:13 +02:00
Kiril Videlov
9a499575c4 fixes a bug with the reflog editing 2024-04-25 19:23:13 +02:00
Kiril Videlov
4c92caafd4 create simple snapshots on branch operations 2024-04-25 19:23:13 +02:00
Kiril Videlov
9a07f50244 fix: correctly handle the case of the feature flag being absent 2024-04-25 19:23:13 +02:00
Kiril Videlov
b3c05b7948 fix signatures 2024-04-25 19:23:13 +02:00
Kiril Videlov
432aeeaf2a feature flag for snapshot creation 2024-04-25 19:23:13 +02:00
Kiril Videlov
753953a7d5 remove tauri endpoint for creating snapshots 2024-04-25 19:23:13 +02:00
Kiril Videlov
5e395a3700 snapshot reflog doesnt need to be exposed 2024-04-25 19:23:13 +02:00
Kiril Videlov
3d04c7fc5b set target ref on snapshot 2024-04-25 19:23:13 +02:00
Kiril Videlov
0911212a9c handle commit not found 2024-04-25 19:23:13 +02:00
Kiril Videlov
ca4f79f7ff reflog entry for the snapshots 2024-04-25 19:23:13 +02:00
Kiril Videlov
a2682e2535 implement undo stack snapshotting 2024-04-25 19:23:13 +02:00
Mattias Granlund
cac2b6a80b
Merge pull request #3609 from gitbutlerapp/Fix-bug-where-sometimes-lock-commit-info-is-unavailable
Look up locked commit from remote commits as well
2024-04-25 19:22:11 +02:00
Mattias Granlund
ebc696ad26 Look up locked commit from remote commits as well
- also filters for unique commits, should really be done in the back end
2024-04-25 19:07:41 +02:00
Sebastian Thiel
066d520f1a less cumbersome error handling for Git errors 2024-04-25 16:42:11 +02:00
Mattias Granlund
e0c2d82127 Reset files into the same branch they were committted to
- regressed when switching to blame for hunk locking
2024-04-25 16:42:11 +02:00
Sebastian Thiel
116f5d02bc
Revert 74eb7bd3 as debounce-timing has no effect (#3601)
This probably means the raciness is not due concurrency introduced by filesystem events,
which leads me to think that having great 'disk-IO-hygiene` should improve things.'
2024-04-25 16:33:55 +02:00
Mattias Granlund
44c64565a2 Add test to ensure hunks can lock across branches
- makes no assertions about how the hunk is displayed
2024-04-25 16:06:03 +02:00
Mattias Granlund
d79b126c59 Remove repetition in create_commit.rs test code 2024-04-25 16:06:03 +02:00
Josh Junon
812b4ea27c
Merge pull request #3603 from Byron/windows-improvements
windows improvements
2024-04-25 12:23:26 +02:00
Sebastian Thiel
29525ffd03
address review comments
- rename feature to `windows`
- remove unused config key from `Cargo.toml`, unfortunately `cfg` isn't available for everything
- make sure feature is toggled on on CI when checking and when publishing
2024-04-25 11:29:24 +02:00
Sebastian Thiel
3058ffbc9b
avoid showing colors in Windows logs (#3601)
People can't copy it without the terminal-escape code, making it harder to read.
2024-04-25 08:19:59 +02:00
Sebastian Thiel
74eb7bd397
on Windows, update far less often on filesystem changes. (#3601)
By increasing the window size for collecting filesystem events,
knowing that each event is processed in parallel, we might be lucky
and that already reduces the likelyhood of clashes.

It's an experiment though.

On Unix, run with:

`LOG_LEVEL=debug pnpm tauri dev --features adapt-to-windows`
2024-04-25 08:17:11 +02:00
Kiril Videlov
bb48dff72a project deleteion cleans up virtual_branches.toml 2024-04-24 17:50:39 +02:00
Pavel Laptev
65f2dc1fa5
fix: didn't show error comes from Rust (#3599) 2024-04-24 17:20:15 +02:00
Josh Junon
40f7234708
Merge pull request #3596 from Byron/fix-mode-windows
avoid to make files executable on Windows (#3329).
2024-04-24 16:23:35 +02:00
Josh Junon
f92c94ff46 build gitbutler-git binaries prior to tests 2024-04-24 16:13:05 +02:00
Sebastian Thiel
a46de60d10 make tests work
This is accomplished by settig the test-feature when running `core` tests.
There is also a safeguard to help assuring this doesn't land in production.
2024-04-24 16:13:05 +02:00