Merge branch 'jk/uploadpack-packobjectshook-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 21 Nov 2018 13:58:08 +0000 (22:58 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Nov 2018 13:58:09 +0000 (22:58 +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 2ae9d9bb475214070529e22cc3f186afebbc6c7c,a47e4c2692e24085fdbf7f523b334bd193f17305..9d4d6ad82f588d153dd7385f6c84600bbca53a5f
@@@ -1076,14 -1070,15 +1076,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");
  }