diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-21 16:58:08 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-21 16:58:09 +0300 |
commit | 2b153408b459e2483fca0215b44b0a1199a1b352 (patch) | |
tree | d3788f184465ad8f1602946f63c0f9de92b3ccdf /upload-pack.c | |
parent | 227124b27178dca25a64d6e9d1f1d9eaf27f34de (diff) | |
parent | aaaa88182266f91ef99ff24847dabc44e08176b2 (diff) |
Merge branch 'jk/uploadpack-packobjectshook-fix' into maint
Code clean-up that results in a small bugfix.
* jk/uploadpack-packobjectshook-fix:
upload-pack: fix broken if/else chain in config callback
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/upload-pack.c b/upload-pack.c index 2ae9d9bb47..9d4d6ad82f 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -1076,14 +1076,17 @@ static int upload_pack_config(const char *var, const char *value, void *unused) 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"); } |