Re: GSoC - Some questions on the idea of
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Apr 2, 2012, 01:00 UTC
- Message-ID
- <CACsJy8CJK4gZwnrqkhq2DUqErS94X=99kvB9z=x9TefG=MrE4A@mail.gmail.com>
- In-Reply-To
- <CA+M5ThTnd+TST6WsAn-Jd=Gb=1EWaJ+QbLMxXgtAVFNVqnRcMw@mail.gmail.com>
On Mon, Apr 2, 2012 at 6:30 AM, Bo Chen <chen@chenirvine.org> wrote:
Show 6 quoted lines
> One question, can anyone help me clear? > > My .git/objects has 3 blobs, a, b, and c. a is a unique file, b and c > two sequential versions of the same file. When I run "git gc", what > exactly happens here, e.g., how exactly git (in the latest version) > delta compresses-the blobs here?
See Documentation/technical/pack-heuristics.txt for how pack-objects (called by"git gc") decides to delta either b or c based on the other one. Once it chooses, say, b to be delta against c, it generates delta using diff-delta.c, then store the delta in either ref-delta or ofs-delta format. The former stores sha-1 of c, the latter the offset of c in the pack.
-- Duy