summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-03-07 23:59:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2024-03-07 23:59:42 (GMT)
commit56d608456000121f141a40c4501d41d712381674 (patch)
tree9c2885bf834dda29b5c9070f223445a5495ad0be /revision.c
parent963a277a521adfa33f6e710e71c7d2a9f4d87a9c (diff)
parent6cd05e768b7e54ca48b16fb0214df4c70aecd46c (diff)
downloadgit-56d608456000121f141a40c4501d41d712381674.zip
git-56d608456000121f141a40c4501d41d712381674.tar.gz
git-56d608456000121f141a40c4501d41d712381674.tar.bz2
Merge branch 'jk/upload-pack-bounded-resources'
Various parts of upload-pack has been updated to bound the resource consumption relative to the size of the repository to protect from abusive clients. * jk/upload-pack-bounded-resources: upload-pack: free tree buffers after parsing upload-pack: use PARSE_OBJECT_SKIP_HASH_CHECK in more places upload-pack: always turn off save_commit_buffer upload-pack: disallow object-info capability by default upload-pack: accept only a single packfile-uri line upload-pack: use a strmap for want-ref lines upload-pack: use oidset for deepen_not list upload-pack: switch deepen-not list to an oid_array upload-pack: drop separate v2 "haves" array
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 0b18b3a..6f8ebc7 100644
--- a/revision.c
+++ b/revision.c
@@ -381,7 +381,8 @@ static struct object *get_reference(struct rev_info *revs, const char *name,
object = parse_object_with_flags(revs->repo, oid,
revs->verify_objects ? 0 :
- PARSE_OBJECT_SKIP_HASH_CHECK);
+ PARSE_OBJECT_SKIP_HASH_CHECK |
+ PARSE_OBJECT_DISCARD_TREE);
if (!object) {
if (revs->ignore_missing)