Adjust for reflog-related api changes

Fixes the sample code to adjust for the new mandatory-reflog API changes.

This fixes https://github.com/libgit2/libgit2/issues/2117.