Merge branch 'jk/uploadpack-packobjectshook-fix'
authorJunio C Hamano <gitster@pobox.com>
Tue, 30 Oct 2018 06:43:50 +0000 (15:43 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Oct 2018 06:43:50 +0000 (15:43 +0900)
Code clean-up that results in a small bugfix.

* jk/uploadpack-packobjectshook-fix:
upload-pack: fix broken if/else chain in config callback

1  2 
upload-pack.c
diff --cc upload-pack.c
index 5dc317c3b437952963f974b0faaaffdb0176fbca,a47e4c2692e24085fdbf7f523b334bd193f17305..3f906ccb40e11ccafbeee9a318f5c040ab591689
@@@ -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");
  }