Using Rugged, what's the canonical way to perform a fast-forward "merge"?
From here I found one possible lead:
# Move branch forward
# Since there's no fast-forward merge in this lib yet, do it by hand.
br = repo.branch "master"
br.move 'master-old', true if br != nil
repo.create_branch 'master', commit_sha
#br.delete! # No real harm in this hanging around
But I'm curious if there's room for improvement here.
There is no need for an operation called "fast-forward merge" libgit2 since a so-called ff-merge is updating the current branch to whatever commit is on the other branch, which does exist.
will update the workdir to what the other side has, and then set the current branch to point to whatever the commit at the tip of the branch to "merge", which is what an ff does.