setup_git_directory_gently: fix off-by-one error