Is it possible to push a commit and not a reference in libgit2?
<p>Is it possible to push a commit and not a reference in libgit2 i.e. basically do the equivalent of <code>git push {remote} {commit}:{branch}</code>?</p>

<p>When I try to call <code>git_remote_upload()</code> with a refspec like <code>e9c46cd9071113c95f6b3fb48b74f98056abf7a1:refs/heads/master</code>, it fails with this error:</p>

<blockquote>
  <p>No such reference 'e9c46cd9071113c95f6b3fb48b74f98056abf7a1'</p>
</blockquote>

<p>Am I doing something wrong or is this feature simply not supported?</p>