Re: [PATCH 3/3] Add filter-objects command

2015-06-19 Thread Junio C Hamano
Jeff King writes: > Right, my point was only that it works for _your_ particular > filter, but it would be nice to have something more general. And > we already have "cat-file --batch-check". IOW, I think I would > prefer the "magical" form because it's a better scripting building > block. As you

Re: [PATCH 3/3] Add filter-objects command

2015-06-19 Thread Charles Bailey
On Fri, Jun 19, 2015 at 11:52:28AM +0100, John Keeping wrote: > On Fri, Jun 19, 2015 at 11:33:24AM +0100, Charles Bailey wrote: > > So, yes, performance is definitely an issue and I could have called this > > command "git magically-generate-all-object-for-scripts" but then, as it > > was so easy to

Re: [PATCH 3/3] Add filter-objects command

2015-06-19 Thread John Keeping
On Fri, Jun 19, 2015 at 11:33:24AM +0100, Charles Bailey wrote: > So, yes, performance is definitely an issue and I could have called this > command "git magically-generate-all-object-for-scripts" but then, as it > was so easy to provide exactly the filtering that I was looking for in > the C code,

Re: [PATCH 3/3] Add filter-objects command

2015-06-19 Thread Jeff King
On Fri, Jun 19, 2015 at 11:33:24AM +0100, Charles Bailey wrote: > > Obviously I've glossed over the "how to get a list of objects" part. > > If you truly want all objects (not just reachable ones), or if "rev-list > > --objects" is too slow [...] > > So, yes, performance is definitely an issue an

Re: [PATCH 3/3] Add filter-objects command

2015-06-19 Thread Charles Bailey
On Fri, Jun 19, 2015 at 06:10:10AM -0400, Jeff King wrote: > On Fri, Jun 19, 2015 at 10:10:59AM +0100, Charles Bailey wrote: > > > filter-objects is a command to scan all objects in the object database > > for the repository and print the ids of those which match the given > > criteria. > > > > T

Re: [PATCH 3/3] Add filter-objects command

2015-06-19 Thread Jeff King
On Fri, Jun 19, 2015 at 10:10:59AM +0100, Charles Bailey wrote: > filter-objects is a command to scan all objects in the object database > for the repository and print the ids of those which match the given > criteria. > > The current supported criteria are object type and the minimum size of > t

[PATCH 3/3] Add filter-objects command

2015-06-19 Thread Charles Bailey
From: Charles Bailey filter-objects is a command to scan all objects in the object database for the repository and print the ids of those which match the given criteria. The current supported criteria are object type and the minimum size of the object. The guiding use case is to scan repositori