Re: [PATCH 2/9] multi-pack-index: store local property
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 20, 2018, 21:14 UTC
- Message-ID
- <CAGZ79kZJJk5DSu+kNBZgxMvy36Fq9tYcBG-BLmpJ6LOKPRtGVg@mail.gmail.com>
- In-Reply-To
- <20180820165124.152146-3-dstolee@microsoft.com>
On Mon, Aug 20, 2018 at 9:52 AM Derrick Stolee <dstolee@microsoft.com> wrote:
Show 8 quoted lines
> > A pack-file is 'local' if it is stored within the usual object > directory. If it is stored in an alternate, it is non-local. > > Pack-files are stored using a 'pack_local' member in the packed_git > struct. Add a similar 'local' member to the multi_pack_index struct > and 'local' parameters to the methods that load and prepare multi- > pack-indexes.
Going by that example, maybe we'd want to have it be the first bit of a bitfield, c.f.
unsigned pack_local:1,
pack_keep:1,
pack_keep_in_core:1,
freshened:1,
do_not_close:1,
pack_promisor:1;in the definition of packed_git.
Is there value in documenting both packfiles as well as midx variables? (When going with the bitfield example, it may be a bit more worthwhile, as the commit message is harder to find, as it will need repeated blaming in the future, if there is a commit on top that adds another bit to the field; I am unsure, but I would lean towards documentation as it becomes a bit unclear: Is the local flag for the midx file that is read, or rather for the underlying packs? What exactly is local? )
AFAICT this patch alone doesn't have any effect, yet, as it only pipes the flag thru, is that worth mentioning or is that obvious?
Thanks, Stefan