Request a repository lock only if the head has actually changed.