From: Nguyen Thai Ngoc Duy Date: Mon, 02 Apr 2012 01:00:22 GMT Subject: Re: GSoC - Some questions on the idea of Message-ID: In-Reply-To: On Mon, Apr 2, 2012 at 6:30 AM, Bo Chen wrote: > 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