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.
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.
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.
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.