[PATCH v3 11/11] update-server-info: respect core.bigfilethreshold
- From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
- Date
- Mar 5, 2012, 03:43 UTC
- Message-ID
- <1330919028-6611-12-git-send-email-pclouds@gmail.com>
- In-Reply-To
- <1330865996-2069-1-git-send-email-pclouds@gmail.com>
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> --- builtin/update-server-info.c | 1 + t/t1050-large.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/builtin/update-server-info.c b/builtin/update-server-info.c index b90dce6..0d63c44 100644 --- a/builtin/update-server-info.c +++ b/builtin/update-server-info.c @@ -15,6 +15,7 @@ int cmd_update_server_info(int argc, const char **argv, const char *prefix) OPT_END() }; + git_config(git_default_config, NULL); argc = parse_options(argc, argv, prefix, options, update_server_info_usage, 0); if (argc > 0) diff --git a/t/t1050-large.sh b/t/t1050-large.sh index 5336eb8..9197b89 100755 --- a/t/t1050-large.sh +++ b/t/t1050-large.sh @@ -147,7 +147,7 @@ test_expect_success 'fsck' ' git fsck --full ' -test_expect_failure 'repack' ' +test_expect_success 'repack' ' git repack -ad '
-- 1.7.3.1.256.g2539c.dirty