git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 7/7] update-server-info: respect core.bigfilethreshold

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Mar 7, 2012, 10:54 UTC
Message-ID
<1331117661-19378-8-git-send-email-pclouds@gmail.com>
In-Reply-To
<1331117661-19378-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 dd1bb84..4d127f1 100755
--- a/t/t1050-large.sh
+++ b/t/t1050-large.sh
@@ -130,7 +130,7 @@ test_expect_success 'git-show a large file' '
 
 '
 
-test_expect_failure 'repack' '
+test_expect_success 'repack' '
 	git repack -ad
 '
 
-- 
1.7.8.36.g69ee2
Previous: Nguyễn Thái Ngọc DuyNext: Junio C Hamano
Message 11 of 13 in “What's cooking in git.git (Mar 2012, #03; Mon, 5)”
  1. Junio C HamanoMar 6, 2012
  2. Nguyen Thai Ngoc DuyMar 6, 2012
  3. Junio C HamanoMar 6, 2012
  4. 0/7 nd/stream-more updatesNguyễn Thái Ngọc Duy, Mar 7, 2012
  5. 1/7 streaming: make streaming-write-entry to be more reusableNguyễn Thái Ngọc Duy, Mar 7, 2012
  6. 2/7 Add more large blob test casesNguyễn Thái Ngọc Duy, Mar 7, 2012
  7. 3/7 cat-file: use streaming API to print blobsNguyễn Thái Ngọc Duy, Mar 7, 2012
  8. 4/7 parse_object: avoid putting whole blob in coreNguyễn Thái Ngọc Duy, Mar 7, 2012
  9. 5/7 show: use streaming API for showing blobsNguyễn Thái Ngọc Duy, Mar 7, 2012
  10. 6/7 fsck: use streaming API for writing lost-found blobsNguyễn Thái Ngọc Duy, Mar 7, 2012
  11. 7/7 update-server-info: respect core.bigfilethresholdNguyễn Thái Ngọc Duy, Mar 7, 2012
  12. Junio C HamanoMar 7, 2012
  13. In preparation for 1.7.10-rc0Junio C Hamano, Mar 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.