diff options
author | Torsten Bögershausen <tboegi@web.de> | 2018-09-12 21:32:02 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-13 00:15:34 +0200 |
commit | d64324cb60e4d0e1f5fdc1d3319c79ddbf5d0eb2 (patch) | |
tree | ee83da9cbe076b9456d1c04d22ed3d08be2f88dd /builtin | |
parent | Git 2.19 (diff) | |
download | git-d64324cb60e4d0e1f5fdc1d3319c79ddbf5d0eb2.tar.xz git-d64324cb60e4d0e1f5fdc1d3319c79ddbf5d0eb2.zip |
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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/check-attr.c | 3 | ||||
-rw-r--r-- | builtin/pack-objects.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/builtin/check-attr.c b/builtin/check-attr.c index c05573ff9c..30a2f84274 100644 --- a/builtin/check-attr.c +++ b/builtin/check-attr.c @@ -65,8 +65,7 @@ static void check_attr(const char *prefix, if (collect_all) { git_all_attrs(&the_index, full_path, check); } else { - if (git_check_attr(&the_index, full_path, check)) - die("git_check_attr died"); + git_check_attr(&the_index, full_path, check); } output_attr(check, file); diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index d1144a8f7e..eb71dab5be 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -951,8 +951,7 @@ static int no_try_delta(const char *path) if (!check) check = attr_check_initl("delta", NULL); - if (git_check_attr(&the_index, path, check)) - return 0; + git_check_attr(&the_index, path, check); if (ATTR_FALSE(check->items[0].value)) return 1; return 0; |