refs.c: avoid repeated git_path calls in rename_tmp_log