summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-30 06:43:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-30 06:43:50 (GMT)
commit32d5d732dd49e7beace91ea31db9f6c0315bc182 (patch)
tree414d0db989a5c120dd086aac2904a2b3dfe89128 /upload-pack.c
parent5d8b3e5d8b5e11e4c931c29e27d835449eae56af (diff)
parentaaaa88182266f91ef99ff24847dabc44e08176b2 (diff)
downloadgit-32d5d732dd49e7beace91ea31db9f6c0315bc182.zip
git-32d5d732dd49e7beace91ea31db9f6c0315bc182.tar.gz
git-32d5d732dd49e7beace91ea31db9f6c0315bc182.tar.bz2
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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 5dc317c..3f906cc 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");
}