update-server-info: respect core.bigfilethreshold

This command indirectly calls check_sha1_signature() (add_info_ref -> deref_tag -> parse_object -> ..) , which may put whole blob in memory if the blob's size is under core.bigfilethreshold. As config is not read, the threshold is always 512MB. Respect user settings here. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Mar 7, 2012 at 17:54 UTC da591a7f4bbe1a208cc5f955523506eb857c45ca
2 files changed +2 -1
builtin/update-server-info.c
+1
@@ -15,6 +15,7 @@ int cmd_update_server_info(int argc, const char **argv, const char *prefix)
15 OPT_END()
16 };
17
18 + git_config(git_default_config, NULL);
19 argc = parse_options(argc, argv, prefix, options,
20 update_server_info_usage, 0);
21 if (argc > 0)
t/t1050-large.sh
+1 -1
@@ -130,7 +130,7 @@ test_expect_success 'git-show a large file' '
130
131 '
132
133 -test_expect_failure 'repack' '
133 +test_expect_success 'repack' '
134 git repack -ad
135 '
136