Web lists-archives.com

Re: git archive generates tar with malformed pax extended attribute

On Tue, May 28, 2019 at 08:01:43PM +0200, René Scharfe wrote:

> Am 28.05.19 um 07:58 schrieb Jeff King:
> > On Sat, May 25, 2019 at 03:26:53PM +0200, René Scharfe wrote:
> >
> >> We could
> >> make git fsck report such symlinks.
> >
> > This is a little tricky, because fsck generally looks at individual
> > objects, and the bad pattern is a combination of a tree and a blob
> > together. I think you could make it work by reusing some of the code and
> > patterns from 9e84a6d758 (Merge branch 'jk/submodule-fsck-loose' into
> > maint, 2018-05-22).
> Actually it's super easy, barely an inconvenience (SCNR, watched a lot
> of those rants recently)..  Did I miss something?

Yes. You cannot rely on calling read_object_file() in real-time when the
fsck is being done by index-pack. The blob in question may be in the
pack you are indexing.

See fsck_finish() for how we do this for .gitmodules checks.