On Mon, Sep 18, 2017 at 04:17:24PM -0700, Jonathan Nieder wrote: > phionah bugosi wrote: > > > Just to reecho a previous change requested before in one of the mail > > threads, we currently have two global variables declared: > > > > struct mru packed_git_mru_storage; > > struct mru *packed_git_mru = &packed_git_mru_storage; > > > > We normally use pointers in C to point or refer to the same location > > or space in memory from multiple places. That means in situations > > where we will have the pointer be assigned to in many places in our > > code. But in this case, we do not have any other logic refering or > > assigning to the pointer packed_git_mru. In simple words we actually > > dont need a pointer in this case. > > > > Therefore this patch makes packed_git_mru global a value instead of > > a pointer and makes use of list.h > > > > Signed-off-by: phionah bugosi <bugosip@xxxxxxxxx> > > --- > > builtin/pack-objects.c | 5 +++-- > > cache.h | 7 ------- > > list.h | 6 ++++++ > > packfile.c | 12 ++++++------ > > 4 files changed, 15 insertions(+), 15 deletions(-) > > *puzzled* This appears to already be in "pu", with a different author. > Did you independently make the same change? Or are you asking for a > progress report on that change, and just phrasing it in a confusing > way? I pointed Phionah at your #leftoverbits comment in: https://public-inbox.org/git/20170912172839.GB144745@xxxxxxxxxxxxxxxxxxxxxxxxx/ about moving packed_git_mru to list.h. But I'm afraid I wasn't very clear in giving further guidance. The goal is to build on _top_ of the patch in that message, and convert the doubly-linked list implementation used in "struct mru" to use the shared code in list.h. That should mostly involve touching mru.c and mru.h, though I think we'd need to tweak the name of the "next" pointer during the traversal, too. -Peff