Only restore branch if available
Only restore branch if available

We're not always on a branch on changelog generation, which means that
we only try to recover the previous path if available.

Signed-off-by: Sascha Grunert <70ab469ddb2ac3e35f32ed7c2fd1cca514b2e879@suse.com>

kubernetes/release,kubernetes/release