diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-10-30 15:43:50 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-30 15:43:50 +0900 |
commit | 32d5d732dd49e7beace91ea31db9f6c0315bc182 (patch) | |
tree | 414d0db989a5c120dd086aac2904a2b3dfe89128 /upload-pack.c | |
parent | 5d8b3e5d8b5e11e4c931c29e27d835449eae56af (diff) | |
parent | aaaa88182266f91ef99ff24847dabc44e08176b2 (diff) | |
download | git-32d5d732dd49e7beace91ea31db9f6c0315bc182.tar.gz |
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
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 5dc317c3b4..3f906ccb40 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -1029,14 +1029,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"); } |