209 Commits

Author SHA1 Message Date
b4285b0512 Use go-git instead of libgit2 for git remote operations
We still need the git_bindings package as we're using it for generating
RSA keys.
2023-12-13 14:14:57 +01:00
88d5cf8713 Upgrade deps + flutter
* Also remove dart_code_metrics
2023-11-25 00:51:25 +01:00
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
8043a27b27 Allow SSH Key type to be configurable
Azure only supports RSA keys.

Fixes #633
2022-06-22 11:17:19 +02:00
e1fb4aa445 Remove full path in include paths
I'm going to be moving this setup logic into its own package so I can
more easily use it in other projects. This is the first step.
2022-06-12 23:50:04 +02:00
e5c49f1792 bugfix: Always launch urls in an external application 2022-06-04 13:39:40 +02:00
be7fe8a407 Fix linting issues 2022-05-16 12:35:38 +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
90285eb039 Cloning libgit2: Better null check
This part doesn't have any automated tests, which is really bad. I need
to move to Dart FFI for libgit2 so I can write some proper tests.
2022-03-18 17:55:25 +01:00
65e5e93448 Select 'main' as the default branch if all other mechansims fail 2022-03-06 23:40:25 +01:00
944e187535 Clone: Add more debug statements
Sigh. This is still failing for some users.
2022-03-02 19:30:14 +01: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
ae09b1ba12 Add unawaited or explicitly wait
There are still many cases (over 60) to fix.
2022-02-23 15:15:49 +01:00
a303dc88e8 Better unwind the exception 2022-02-20 02:14:26 +05:30
dbe2eada3a Add some tests for the cloning
Found one bug in the git_desktop!
2022-02-14 16:49:28 +05:30
dd6b08a5a6 clone: Improve error message 2022-02-06 19:45:49 +05:30
3ede4634a3 StatefulWidget: Mark internal variables are private 2022-01-27 12:38:57 +01:00
55c63ed4ad GitTransferProgress: Make it prettier
Also add a test
2022-01-25 14:47:32 +01:00
b690dd763e GitTransferProgress: Cleanup 2022-01-25 14:39:25 +01:00
5e004e28d9 Avoid extra logs 2022-01-25 14:35:20 +01:00
3b2dcd7181 Bump dart-git
Now the repo needs to be explicitly closed. This way, we avoid opening
and closing the packfiles again and again. It results in the "Reading
Git History .." page taking about 40% less time.
2022-01-25 11:41:55 +01:00
94acf5631d GitAsyncRepo now auto-closes
And avoids spawning a new isolate per operation
2022-01-17 15:21:38 +01:00
59c2cc311c Move more logic out of the setup screens 2022-01-13 19:16:28 +01:00
e5b8c942c3 Setup: Move some logic to GJRepo
I would prefer if GJRepo was the only place through which the state was
being changed.
2022-01-13 19:13:02 +01:00
6c45d51b24 Port away from deprecated function 2022-01-13 19:04:16 +01:00
e2b6d94eda analyzer: Fix unnecessry includes 2022-01-13 19:03:16 +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
d7d77a1eb6 Setup: Fix KeyEditors form
The key was missing and this broke custom keys.
2021-12-23 16:38:49 +01:00
9d70d53e35 Never just hang on loading
This would happen if the current repo couldn't be opened.

We now show a special "Error Screen", and allow the user to add another
repo.
2021-12-16 13:05:02 +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
81b6ebe2f5 lint: avoid-ignoring-return-values++ 2021-11-17 18:10:59 +01:00
c3e7a9ffd7 lint: Add avoid_void_async 2021-11-17 18:10:59 +01:00
41567f4d50 Use ed25519 instead of rsa
Fixes #559
Fixes #260
2021-11-15 13:19:54 +01:00
a824e1c9de Use 'main' as the default branch
Causes less problems as most users are on GitHub which also uses 'main'
2021-11-07 17:28:16 +01:00
a66156c849 AppRouter: Store the routePath in each class
Instead of one global place for them.
2021-10-30 11:57:36 +02:00
28f34ca5e6 Avoid catching only Exceptions
We also occasionally get Errors in runtime. It seems like a terrible
decission for Error and Exception to not have a common subtype.
2021-10-20 09:59:14 +02:00
1c60400d91 Setup RepoSelector: Always show the next button 2021-10-15 16:16:49 +02:00
e1464f32c8 Change print to Log
Lets avoid using print as that doesn't get saved.
2021-10-13 11:36:05 +02:00
f924a3a1c2 AutoConfigure: Use the username if name is empty
It's better than using the GitJournal name
2021-09-22 21:45:59 +02:00
c6e1054686 Fix build
A problem from Updating Flutter?
2021-09-22 19:21:44 +02:00
c4ef1f569b Use flutter_lint
Instead of picking lint values. This way I don't need to routinely
looking at extra lints to enable.
2021-09-21 15:42:13 +02:00
c8851212a1 Catch autoconfigure errors
Shouldn't ever happen, but still.
2021-09-20 14:53:59 +02:00
b9cee1ee92 ManualSetup: Auto-fix the most common error 2021-09-17 12:21:56 +02:00