This implementation is much more close to the documentation & fold all
changes into one commit. Then, it pushes this commit remotely. This
commit deleted local changes which complexify the codebase for a
questionable interest. As the documentation said, any changes are
delayed and not directly "committed" until the end of the given
function. For instance:
> batch
> set /bar "Bar"
> exists /bar
/bar does not exists
is an expected behavior. Only after a quit (which delimit the end of the
batch process), /bar will be committed and will exist!
If we have nothing, we just want the last commit, if we have something, we want
commits between what we have and what the server has. Then, we shallow
correctly our internal store to still keep only one commit.
All of these actions "shallow" the last commit. A subsequent `push`
will do nothing due to that incapacity to walk through the history
due to the shallowed commit. To be able to push the last change,
we must provide {set,remove,rename} functions with an explicit
call to push **before** the "shallow".