[PATCH] pack-objects: turn off bitmaps when skipping objects

2014-03-14 Thread Jeff King
The pack bitmap format requires that we have a single bit for each object in the pack, and that each object's bitmap represents its complete set of reachable objects. Therefore we have no way to represent the bitmap of an object which references objects outside the pack. We notice this problem

[PATCH] pack-objects: turn off bitmaps when skipping objects

2014-01-23 Thread Jeff King
On Wed, Jan 22, 2014 at 06:38:57PM -0800, Siddharth Agarwal wrote: Running git-next, writing bitmap indexes fails if a keep file is present from an earlier pack. Right, that's expected. The bitmap format cannot represent objects that are not present in the pack. So we cannot write a bitmap

Re: [PATCH] pack-objects: turn off bitmaps when skipping objects

2014-01-23 Thread Siddharth Agarwal
On 01/23/2014 02:52 PM, Jeff King wrote: Right, that's expected. The bitmap format cannot represent objects that are not present in the pack. So we cannot write a bitmap index if any object reachable from a packed commit is omitted from the pack. We could be nicer and downgrade it to a

Re: [PATCH] pack-objects: turn off bitmaps when skipping objects

2014-01-23 Thread Siddharth Agarwal
On 01/23/2014 03:45 PM, Siddharth Agarwal wrote: The worry is less certain objects not being packed and more the old packs being deleted by git repack, isn't it? From the man page for git-index-pack: This should probably be new pack and not old packs, I guess. Not knowing much about how

Re: [PATCH] pack-objects: turn off bitmaps when skipping objects

2014-01-23 Thread Vicent Martí
On Fri, Jan 24, 2014 at 12:45 AM, Siddharth Agarwal s...@fb.com wrote: Yes, we'd prefer to do that too. How do you actually do this, though? I don't see a way to pass `--honor-pack-keep` (shouldn't I pass in its inverse?) down to `git-pack-objects`. We run with this patch in production, it may

Re: [PATCH] pack-objects: turn off bitmaps when skipping objects

2014-01-23 Thread Jeff King
On Fri, Jan 24, 2014 at 12:56:17AM +0100, Vicent Martí wrote: On Fri, Jan 24, 2014 at 12:45 AM, Siddharth Agarwal s...@fb.com wrote: Yes, we'd prefer to do that too. How do you actually do this, though? I don't see a way to pass `--honor-pack-keep` (shouldn't I pass in its inverse?) down

Re: [PATCH] pack-objects: turn off bitmaps when skipping objects

2014-01-23 Thread Jeff King
On Thu, Jan 23, 2014 at 03:53:28PM -0800, Siddharth Agarwal wrote: On 01/23/2014 03:45 PM, Siddharth Agarwal wrote: The worry is less certain objects not being packed and more the old packs being deleted by git repack, isn't it? From the man page for git-index-pack: This should probably

Re: [PATCH] pack-objects: turn off bitmaps when skipping objects

2014-01-23 Thread Siddharth Agarwal
On 01/23/2014 06:28 PM, Jeff King wrote: I think your understanding is accurate here. So we want repack to respect keep files for deletion, but we _not_ necessarily want pack-objects to avoid packing an object just because it's in a pack marked by .keep (see my other email). Yes, that makes