summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-11-21 22:58:08 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-21 22:58:09 +0900
commit2b153408b459e2483fca0215b44b0a1199a1b352 (patch)
treed3788f184465ad8f1602946f63c0f9de92b3ccdf
parentMerge branch 'uk/merge-subtree-doc-update' into maint (diff)
parentupload-pack: fix broken if/else chain in config callback (diff)
downloadtgif-2b153408b459e2483fca0215b44b0a1199a1b352.tar.xz
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
-rw-r--r--upload-pack.c9
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");
}