It's not perfect as our implementation of git pull results in an extra
merge commit and doesn't handle conflicts properly, but it is a basic
implementation, so at least we have something.
The annotated commit must be created from the remote's branch's ref.
This entire thing is quite confusing, but for now at least git pull's
work properly, though with an extra merge commit.
In order to do a commit, we need the parents for that commit. In the
case of a merge commit - it should be the 'master' and 'origin/master'
(in the case of the master branch). I cannot seem to get the id of the
'origin/master' commit. So, for now it is hardcoded.
But hey, at least this works.
This was what I was using to try out this library locally. I probably
should have made a proper unit test suite, but this was just so much
faster and easier.
LibGit2 has been designed in a strange way. It doesn't give us an easy
way of knowing if and why the credentials has failed, it jusst keep
calling the credentials failed method.
We are now working around this.
Libgit2 is quite horrible. When passing it credentials, if the
credentials are invalid, it will just ask for the credentials again and
again and again, without giving any feedback that the credentials have
failed. This just sucks.
This will allow us to remove the jgit dependency. JGit is annoying
because we have to use an old version in order to support older API
versions. Additionally, there are some subtle differences in their
implementation.
Finally, for iOS and desktop we will be using libgit2, so we may as well
use the same stack on Android.
* Display a longer message when reloading - It's easier to see
* Make flutter_run start the reload script and kill it automatically.
This is always the behaviour I want when running an app via flutter run.