Skip to content

Don't lazy-fetch commits when parsing them

Jonathan Tan git 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest4 patches 2 repliesIn review
  2. v54 patches 2 repliesSuperseded
  3. v44 patches 9 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v34 patches9 repliesSuperseded
v2 posting 2/23 patches14 repliesSuperseded
v2 posting 1/24 patches6 repliesSuperseded
v14 patches9 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4object-file: remove OBJECT_INFO_IGNORE_LOOSEobject-file.c object-store.h+1 -60 replies
2/4object-file: refactor map_loose_object_1()object-file.c+24 -260 replies
3/4object-file: emit corruption errors when detectedobject-file.c object-store.h+31 -270 replies
4/4commit: don't lazy-fetch commitscommit.c+13 -20 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchJeff King
1/4Helped-by
2/4
3/4Helped-by
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/4] Don't lazy-fetch commits when parsing them

Thanks everyone once again and sorry for the churn. Hopefully I got it right this time.

open_loose_object() is documented to return the path of the object we found, so I think we already have that covered (if we detect that an object is corrupt, it follows that we would already have found the object in the first place).

Jonathan Tan (4):
object-file: remove OBJECT_INFO_IGNORE_LOOSE
object-file: refactor map_loose_object_1()
object-file: emit corruption errors when detected
commit: don't lazy-fetch commits

 commit.c       |  15 ++++++-
 object-file.c  | 108 ++++++++++++++++++++++++-------------------------
 object-store.h |   7 ++--
 3 files changed, 69 insertions(+), 61 deletions(-)

Range-diff against v5:

1:  be0b08cac2 = 1:  be0b08cac2 object-file: remove OBJECT_INFO_IGNORE_LOOSE
2:  4b2fb68743 = 2:  4b2fb68743 object-file: refactor map_loose_object_1()
3:  a229ea0b11 ! 3:  811620909a object-file: emit corruption errors when detected
    @@ object-file.c: static int loose_object_info(struct repository *r,
      	int status = 0;
     +	int fd;
      	unsigned long mapsize;
    -+	const char *path = NULL;
    ++	const char *path;
      	void *map;
      	git_zstream stream;
      	char hdr[MAX_HEADER_LEN];
    @@ object-file.c: static int loose_object_info(struct repository *r,
      		break;
      	}
      
    -+	if (status && path && (flags & OBJECT_INFO_DIE_IF_CORRUPT))
    ++	if (status && (flags & OBJECT_INFO_DIE_IF_CORRUPT))
     +		die(_("loose object %s (stored in %s) is corrupt"),
     +		    oid_to_hex(oid), path);
     +

4: b54972118a = 4: 8acf1a29e7 commit: don't lazy-fetch commits

Signature · 1 line
2.39.0.314.g84b9a713c41-goog