Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Jeff King
On Mon, Jun 22, 2015 at 02:50:10PM -0700, Junio C Hamano wrote: > > We may want to take patch 1 separately for the maint-track, as it is > > really a bug-fix (albeit one that I do not think actually affects anyone > > in practice right now). > > Hmph, add_unseen_recent_objects_to_traversal() is t

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Junio C Hamano
Jeff King writes: > On Mon, Jun 22, 2015 at 04:38:22AM -0400, Jeff King wrote: > >> > + 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

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Charles Bailey
On Mon, Jun 22, 2015 at 06:33:21AM -0400, Jeff King wrote: > On Mon, Jun 22, 2015 at 04:38:22AM -0400, Jeff King wrote: > > > > + prepare_packed_git(); > > > + for (p = packed_git; p; p = p->next) { > > > + open_pack_index(p); > > > + } > > > > Yikes. The fact that you need to do this mea

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Charles Bailey
On Mon, Jun 22, 2015 at 04:38:22AM -0400, Jeff King wrote: > On Sun, Jun 21, 2015 at 08:20:31PM +0100, Charles Bailey wrote: > > > + prepare_packed_git(); > > + for (p = packed_git; p; p = p->next) { > > + open_pack_index(p); > > + } > > Yikes. The fact that you need to do this me

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Jeff King
On Mon, Jun 22, 2015 at 04:38:22AM -0400, Jeff King wrote: > > + 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.

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Jeff King
On Mon, Jun 22, 2015 at 04:57:28PM +0700, Duy Nguyen wrote: > On Mon, Jun 22, 2015 at 2:20 AM, Charles Bailey wrote: > > From: Charles Bailey > > > > list-all-objects is a command to print the ids of all objects in the > > object database of a repository. It is designed as a low overhead > > int

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Duy Nguyen
On Mon, Jun 22, 2015 at 2:20 AM, Charles Bailey wrote: > From: Charles Bailey > > list-all-objects is a command to print the ids of all objects in the > object database of a repository. It is designed as a low overhead > interface for scripts that want to analyse all objects but don't require > t

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Jeff King
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)

[PATCH] Add list-all-objects command

2015-06-21 Thread Charles Bailey
From: Charles Bailey list-all-objects is a command to print the ids of all objects in the object database of a repository. It is designed as a low overhead interface for scripts that want to analyse all objects but don't require the ordering implied by a revision walk. It will list all objects,