Message ID | 7c0e4acc845d1135e684188b2ccc61cf358994dc.1610129796.git.me@ttaylorr.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | pack-revindex: prepare for on-disk reverse index | expand |
On 1/8/2021 1:18 PM, Taylor Blau wrote: > diff --git a/pack-revindex.h b/pack-revindex.h > index b5dd114fd5..b501a7cd62 100644 > --- a/pack-revindex.h > +++ b/pack-revindex.h > @@ -3,11 +3,6 @@ > > struct packed_git; > > -struct revindex_entry { > - off_t offset; > - unsigned int nr; > -}; > - Very nice. A successful anonymization of a struct. -Stolee
On Fri, Jan 08, 2021 at 01:18:01PM -0500, Taylor Blau wrote: > Now that all spots outside of pack-revindex.c that reference 'struct > revindex_entry' directly have been removed, it is safe to hide the > implementation by moving it from pack-revindex.h to pack-revindex.c. That was a lot of patches to get here, but this is a very nice outcome. :) -Peff
diff --git a/pack-revindex.c b/pack-revindex.c index 9392c4be73..36ef276378 100644 --- a/pack-revindex.c +++ b/pack-revindex.c @@ -3,6 +3,11 @@ #include "object-store.h" #include "packfile.h" +struct revindex_entry { + off_t offset; + unsigned int nr; +}; + /* * Pack index for existing packs give us easy access to the offsets into * corresponding pack file where each object's data starts, but the entries diff --git a/pack-revindex.h b/pack-revindex.h index b5dd114fd5..b501a7cd62 100644 --- a/pack-revindex.h +++ b/pack-revindex.h @@ -3,11 +3,6 @@ struct packed_git; -struct revindex_entry { - off_t offset; - unsigned int nr; -}; - int load_pack_revindex(struct packed_git *p); int offset_to_pack_pos(struct packed_git *p, off_t ofs, uint32_t *pos);
Now that all spots outside of pack-revindex.c that reference 'struct revindex_entry' directly have been removed, it is safe to hide the implementation by moving it from pack-revindex.h to pack-revindex.c. Signed-off-by: Taylor Blau <me@ttaylorr.com> --- pack-revindex.c | 5 +++++ pack-revindex.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)