Re: Understanding pack format
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Nov 6, 2018, 16:06 UTC
- Message-ID
- <CACsJy8AYtz2tjo5ZB_6Mj9MWaUnYGs4GUO2+6E6nDKiNzrJoAg@mail.gmail.com>
- In-Reply-To
- <CAFd4kYDcX2BOYvMg1X9zO68EfYYE6Zke_-9CGY-Yi01jCc3EPA@mail.gmail.com>
On Tue, Nov 6, 2018 at 3:23 AM Farhan Khan <khanzf@gmail.com> wrote:
> To follow-up from the other day, I have been reading the code that > retrieves the pack entry for the past 3 days now without much success. > But there are quite a few abstractions and I get lost half-way down > the line.
Jeff already gave you some pointers. This is just a side note.
I think it's easier to run the code under a debugger and see what it does than just reading it. You can create a repo with just one blob to have better control over it (small packs also make it possible to examine with a hex editor in parallel), e.g.
git init foo cd foo echo hello >file git add file git repack -ad gdb --args git show :./file
then put a breakpoint in some interesting functions (perhaps one of those Jeff pointed out)
-- Duy