summaryrefslogtreecommitdiff
path: root/ll-merge.c
diff options
context:
space:
mode:
authorLibravatar Torsten Bögershausen <tboegi@web.de>2018-09-12 21:32:02 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-09-12 15:15:34 -0700
commitd64324cb60e4d0e1f5fdc1d3319c79ddbf5d0eb2 (patch)
treeee83da9cbe076b9456d1c04d22ed3d08be2f88dd /ll-merge.c
parentGit 2.19 (diff)
downloadtgif-d64324cb60e4d0e1f5fdc1d3319c79ddbf5d0eb2.tar.xz
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 'll-merge.c')
-rw-r--r--ll-merge.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ll-merge.c b/ll-merge.c
index 0e2800f7bb..1936fee9e1 100644
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -371,13 +371,12 @@ int ll_merge(mmbuffer_t *result_buf,
if (!check)
check = attr_check_initl("merge", "conflict-marker-size", NULL);
- if (!git_check_attr(&the_index, path, check)) {
- ll_driver_name = check->items[0].value;
- if (check->items[1].value) {
- marker_size = atoi(check->items[1].value);
- if (marker_size <= 0)
- marker_size = DEFAULT_CONFLICT_MARKER_SIZE;
- }
+ git_check_attr(&the_index, path, check);
+ ll_driver_name = check->items[0].value;
+ if (check->items[1].value) {
+ marker_size = atoi(check->items[1].value);
+ if (marker_size <= 0)
+ marker_size = DEFAULT_CONFLICT_MARKER_SIZE;
}
driver = find_ll_merge_driver(ll_driver_name);
@@ -398,7 +397,8 @@ int ll_merge_marker_size(const char *path)
if (!check)
check = attr_check_initl("conflict-marker-size", NULL);
- if (!git_check_attr(&the_index, path, check) && check->items[0].value) {
+ git_check_attr(&the_index, path, check);
+ if (check->items[0].value) {
marker_size = atoi(check->items[0].value);
if (marker_size <= 0)
marker_size = DEFAULT_CONFLICT_MARKER_SIZE;