branch: fix leak when checking against HEAD
We look up a reference in order to figure out if it's the current branch, which we need to free once we're done with the check. As a bonus, only perform the check when we're passed the force flag, as it's a useless check otherwise.
Showing
Please
register
or
sign in
to comment