Skip to content

handling warnings due to auto-enabled bitmaps

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3t7700: clean up .keep file in bitmap-writing testt/t7700-repack.sh+1 -00 replies
2/3repack: silence warnings when auto-enabled bitmaps cannot be builtbuiltin/pack-objects.c builtin/repack.c t/t7700-repack.sh+36 -112 replies
3/3repack: simplify handling of auto-bitmaps and .keep filesbuiltin/repack.c t/t7700-repack.sh+4 -161 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] handling warnings due to auto-enabled bitmaps
Quoted 15 lines · Jeff King
Quoted 8 lines · Ævar Arnfjörð Bjarmason
Quoted 7 lines

Instead, it may make sense to turn the --write-bitmap-index option of pack-objects into a tri-state: true/false/auto. Then pack-objects would know that we are in best-effort mode, and would avoid warning in that case. That would also let git-repack express its intentions better to git-pack-objects, so we could replace 7328482253, and keep more of the logic in pack-objects, which is ultimately what has to make the decision about whether it can generate bitmaps.

Quoted 4 lines

Sounds like pentastate to me :) (penta = 5, had to look it up). I.e. in most cases of "auto" we pick a true/false at the outset, whereas this is true/true-but-dont-care-much/false/false-but-dont-care-much with "auto" picking the "-but-dont-care-much" versions of a "soft" true/false.

Quoted 5 lines

I don't think we care about false-but-dont-care-much. Pack-objects just needs to know whether the bitmaps are the user's expressed intention, or just something that it should do if it's convenient.

I'll see if I can work up a patch to demonstrate.

This actually turned out pretty well, I think. I wish I had thought of it when were initially looking at the .keep stuff. :) It was not too hard to clean that up in the third patch, though.

[1/3]: t7700: clean up .keep file in bitmap-writing test [2/3]: repack: silence warnings when auto-enabled bitmaps cannot be built [3/3]: repack: simplify handling of auto-bitmaps and .keep files

 builtin/pack-objects.c | 21 ++++++++++++++++-----
 builtin/repack.c       | 24 +++++++-----------------
 t/t7700-repack.sh      | 15 ++++++++++++++-
 3 files changed, 37 insertions(+), 23 deletions(-)