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 means that

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

2015-06-22 Thread Junio C Hamano
Jeff King p...@peff.net 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, IMHO.

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 the only

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. Here's

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: + sha1 SP type SP size s/followin/g/ +int cmd_list_all_objects(int argc, const char **argv, const char

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

2015-06-22 Thread Duy Nguyen
On Mon, Jun 22, 2015 at 2:20 AM, Charles Bailey char...@hashpling.org wrote: From: Charles Bailey cbaile...@bloomberg.net 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

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 means that

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 char...@hashpling.org wrote: From: Charles Bailey cbaile...@bloomberg.net list-all-objects is a command to print the ids of all objects in the object database of a repository. It

[PATCH] Add list-all-objects command

2015-06-21 Thread Charles Bailey
From: Charles Bailey cbaile...@bloomberg.net 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