From: Jeff King Date: Mon, 22 Jun 2015 08:38:22 GMT Subject: Re: [PATCH] Add list-all-objects command Message-ID: <20150622083822.GB12259@peff.net> In-Reply-To: <1434914431-7745-2-git-send-email-charles@hashpling.org> On Sun, Jun 21, 2015 at 08:20:31PM +0100, Charles Bailey wrote: > +OPTIONS > +------- > + > +-v:: > +--verbose:: > + Output in the followin format instead of just printing object ids: > + SP SP s/followin/&g/ > +int cmd_list_all_objects(int argc, const char **argv, const char *prefix) > +{ > + struct packed_git *p; > + > + argc = parse_options(argc, argv, prefix, builtin_filter_objects_options, > + NULL, 0); > + > + for_each_loose_object(check_loose_object, NULL, 0); > + > + prepare_packed_git(); > + for (p = packed_git; p; p = p->next) { > + open_pack_index(p); > + } Yikes. The fact that you need to do this means that for_each_packed_object is buggy, IMHO. I'll send a patch. -Peff