Make git_check_attr() a void function

git_check_attr() returns always 0.
Remove all the error handling code of the callers, which is never executed.
Change git_check_attr() to be a void function.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Torsten Bögershausen
2018-09-12 21:32:02 +02:00
committed by Junio C Hamano
parent 1d4361b0f3
commit d64324cb60
9 changed files with 57 additions and 69 deletions

View File

@ -278,8 +278,7 @@ struct userdiff_driver *userdiff_find_by_path(const char *path)
check = attr_check_initl("diff", NULL);
if (!path)
return NULL;
if (git_check_attr(&the_index, path, check))
return NULL;
git_check_attr(&the_index, path, check);
if (ATTR_TRUE(check->items[0].value))
return &driver_true;