657721adc6
Update dart-git and stop using the Result class
...
Instead we're going to move back to standard exceptions.
Using a custom Result class has created far far more problems
- The Stacktraces aren't always right
- Sometimes one forgets to check the Result error
- All other exception throwing code needing to be converted to Results
- Non idiomatic Dart code
I think it's better to just go back to exceptions. They have their
problems, but overall, I think it's a better approach.
2023-11-24 14:03:30 +01:00
6d8688b83d
Fix introduction of non-ascii space
...
Not sure how this happened
2022-06-28 23:08:08 +02:00
45430349e3
fix formatting errors
2022-06-28 22:42:53 +02:00
f4a1df6604
Move cloning code back into GitJournal
...
I want the git_setup code to only have the UI. Nothing else. The cloning
process for GitJournal is very specific to GitJournal. It doesn't need
to be that complicated for other projects.
2022-06-27 13:21:10 +02:00
00e6f39e67
Move setup code into its own package
2022-06-26 15:08:55 +02:00
6aa62090a9
Use a standard git clone when there is no history
...
Clearly dart-git is still quite buggy. Lets go back to libgit2, this was
quite a big mistake.
2022-05-16 12:08:15 +02:00
849b2874c8
Clone: Use dart-git's merge function
...
The code has been thoroughly tested with lots of unit tests, at this
point I'm more confident about it than libgit2 (for this particular
usecase)
2022-02-23 17:27:29 +01:00
996cf78ce5
Fix stupid bug
...
Now most of this code is completely unit tested. It resulted in the
discovery of a race-condition.
Fixes #598
2022-02-23 17:23:44 +01:00
dd6b08a5a6
clone: Improve error message
2022-02-06 19:45:49 +05:30
94acf5631d
GitAsyncRepo now auto-closes
...
And avoids spawning a new isolate per operation
2022-01-17 15:21:38 +01:00
f9271edad3
Upgrade to latest dart-git
...
Most of dart-git's operations are synchronous by default now. The async
functions run on another isolate.
2022-01-13 18:14:01 +01:00
8962f3f745
Set default branch to be main
2021-12-29 15:31:25 +01:00
7a92d10df9
avoid-ignoring-return-values++
2021-12-14 14:02:09 +01:00
d6c5bd45bb
Clone: Do not ignore errors
2021-12-10 11:23:31 +01:00
33a731a3d7
Add reuse licensing to files in lib
2021-09-15 13:06:43 +02:00
3a71cca202
Move logging code to its own folder
2021-07-30 14:39:13 +02:00
471669e20b
Add another dashbook experiment
...
This is being use to test out the cloning screen. It runs on Flutter
Web!
2021-07-30 12:57:35 +02:00
2505d00dfb
Replace dart:io with universal_io
...
Platform from dart:io cannot be used on the web for reasons. And this
way we get a fake File/Directory class which we can use for atleast
running the web version, even if it won't work.
2021-07-30 11:39:26 +02:00
4811259940
GitTransferProgress: parsing checks
2021-07-27 10:58:22 +02:00
23541f7466
Sync: Allow the merge to fail
2021-07-25 11:44:28 +02:00
1161449ea4
CloneSetup: Log the stackTrace
2021-07-25 11:27:29 +02:00
b44a33e14e
clone: Catch errors in checkout
2021-07-25 10:14:33 +02:00
d9ce74e249
setup clone: Simplify code
...
This way we can avoid the extra try/catch block
2021-07-23 16:37:52 +02:00
9597f35a44
clone: Split into multiple files and make it more pluggable
...
This way I can more easily choose if I want to use libgit2 or the git
executable or whatever. It's being done so that one can wrtie automated
tests for this cloneRemote function.
There are still some users for whom this doesn't work, and after so so
many iterations, it's time to write tests. This is just way too complex
for me without tests.
2021-07-23 15:18:25 +02:00
09026fc59e
Add support for getting clone progress from git_bindings
...
This is hacky, and we're getting it through a file. Right now we aren't
doing anything with the progress, we're just fetching it.
2021-07-23 12:48:48 +02:00
cd754e52b5
setup desktop: Get the remote's default branch
...
Instead of guessing
2021-07-13 17:55:43 +02:00
4e1df9bc31
Use dart-git's merge when cloning
2021-07-08 10:06:56 +02:00
ea2e0f8df2
macos: Call the git exec for fetching / pushing
...
This doesn't work for keys which have passwords, but otherwise it seems
to work great.
2021-07-07 23:46:00 +02:00
cca40de706
Bump dart-git
...
Since dart-git's API has completely changed, this is a huge change. And
it's now obvious where all the code can fail. This needs a massive
re-write.
2021-06-05 13:39:46 +02:00
a5b6940884
Setup: Migrate to null safety
2021-06-02 08:42:13 +02:00
d008f0d982
First version of dart migrate
...
Most of the files haven't been migrated. Lets work on this bit by bit
2021-04-10 22:18:35 +02:00
5f2d108751
Fix repo being empty after clone
...
Fixes #473
2021-03-21 14:44:40 +01:00
30ee6c3889
Hopefully workaround dart-git errors
...
I think these are causing some clones to fail, but I'm not 100% certain.
I'm just going to roll the dice and see.
2021-03-05 14:57:58 +01:00
4feb26a5d4
createBranch: headHash is auto inferred
...
Fixes APP-X0
2021-02-24 11:55:29 +01:00
7f35218bc0
Rename repo folder on clone
...
Take the name from the clone url
2021-02-19 12:27:33 +01:00
73c5c56a38
Handle branch is null bug
...
Hopefully I've now handled every single case of it.
2021-02-18 17:18:33 +01:00
b71e3c74d3
Update dart-git
...
Hopefully this all still works. A massive amount of testing is required
2021-02-15 15:47:59 +01:00
76c0ec6503
clone: Add some more debug statements
...
I cannot understand why a user has still reported a bug with it.
2021-01-23 06:37:58 +01:00
a60e2bbf2a
Fix setup git host failing
...
Outlined every case properly and tested it thoroughly. If this still
fails I am a terrible programmer, and should learn to isolate components
and write through tests.
Fixes #394 #378 #368
2021-01-22 10:51:53 +01:00
29ffa2c540
Improve logging
2021-01-19 16:55:27 +01:00
4c7efdb2dc
Move cloning logic to its own file
...
This has gotten very complex and needs to be properly tested. It's the
number 1 bug.
2021-01-19 15:40:08 +01:00
5123938e53
Setup: Rename screen to Loading/Error screen
...
It's all that it does. This way we can re-use this screen in other
places.
2020-05-18 18:13:21 +02:00
98fb1ccff5
Move git host setup files to setup folder
2020-02-17 16:51:52 +01:00