From: Junio C Hamano Date: Tue, 30 Oct 2018 06:43:50 +0000 (+0900) Subject: Merge branch 'jk/uploadpack-packobjectshook-fix' X-Git-Tag: v2.20.0-rc0~97 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/32d5d732dd49e7beace91ea31db9f6c0315bc182 Merge branch 'jk/uploadpack-packobjectshook-fix' Code clean-up that results in a small bugfix. * jk/uploadpack-packobjectshook-fix: upload-pack: fix broken if/else chain in config callback --- 32d5d732dd49e7beace91ea31db9f6c0315bc182 diff --cc upload-pack.c index 5dc317c3b4,a47e4c2692..3f906ccb40 --- a/upload-pack.c +++ b/upload-pack.c @@@ -1029,14 -1070,15 +1029,17 @@@ static int upload_pack_config(const cha keepalive = git_config_int(var, value); if (!keepalive) keepalive = -1; - } else if (current_config_scope() != CONFIG_SCOPE_REPO) { - if (!strcmp("uploadpack.packobjectshook", var)) - return git_config_string(&pack_objects_hook, var, value); } else if (!strcmp("uploadpack.allowfilter", var)) { allow_filter = git_config_bool(var, value); + } else if (!strcmp("uploadpack.allowrefinwant", var)) { + allow_ref_in_want = git_config_bool(var, value); } + + if (current_config_scope() != CONFIG_SCOPE_REPO) { + if (!strcmp("uploadpack.packobjectshook", var)) + return git_config_string(&pack_objects_hook, var, value); + } + return parse_hide_refs_config(var, value, "uploadpack"); }