This comment continues from https://github.com/libgit2/libgit2sharp/pull/608/files#r9262013.

I'm guessing the following but it looks to me like the string reference "HEAD" is a reference to the actual HEAD pointer (not sure what you'd call it) in Git. What works for the above test was a reference to what the HEAD is pointing at:
```
Refs.UpdateTarget(this.Head.CanonicalName, fastForwardCommit.Id.Sha);
```
I'm pretty sure that'd work with a detached head also (which comes in as a reference with a canonical name also?).
This is all late night guess work so I very much apologize if I'm way off on all this or I'm not making sense. 
Please be gentle.