list_commands: only call git_exec_path if it is needed