Prevent update-head fail if branch not present in refs/head

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Version up to 1.7.6

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>