attr: reformat git_attr_set_direction() function