How about not exiting there and logging empty messages? This would make the code behave similarly to https://github.com/libgit2/libgit2/pull/1920. Beware, there will be some reflog related tests which will fail.