Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-23 Thread Junio C Hamano
Johannes Schindelin writes: > To fix this, I prepared a GitGitGadget PR > (https://github.com/gitgitgadget/git/pull/87) and will submit it as soon > as I am satisfied that the build works. Thanks. This won't be in the upcoming release anyway, so we can fix it up without "oops, let's pile

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-22 Thread Johannes Schindelin
Hi Junio, On Wed, 21 Nov 2018, Junio C Hamano wrote: > Оля Тележная writes: > > >> I am OK if we avoid PRIdMAX and use PRIuMAX instead with a cast to > >> the corresponding size in this codepath, as long as we properly > >> handle negative oi.disk_size field, which may be telling some > >>

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-20 Thread Junio C Hamano
Оля Тележная writes: >> I am OK if we avoid PRIdMAX and use PRIuMAX instead with a cast to >> the corresponding size in this codepath, as long as we properly >> handle negative oi.disk_size field, which may be telling some >> "unusual" condition to us. > > Maybe we want to change the type (from

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-20 Thread Оля Тележная
вт, 13 нояб. 2018 г. в 04:52, Junio C Hamano : > > Jeff King writes: > > >> You mean something like > >> > >> v->s = xstrfmt("%"PRIdMAX, (intmax_t)oi->disk_size); > > > > I think elsewhere we simply use PRIuMAX for printing large sizes via > > off_t; we know this value isn't

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-12 Thread Junio C Hamano
Jeff King writes: >> You mean something like >> >> v->s = xstrfmt("%"PRIdMAX, (intmax_t)oi->disk_size); > > I think elsewhere we simply use PRIuMAX for printing large sizes via > off_t; we know this value isn't going to be negative. > > I'm not opposed to PRIdMAX, which

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-12 Thread Jeff King
On Mon, Nov 12, 2018 at 01:03:25PM +0100, Johannes Schindelin wrote: > > oi.disk_size is off_t; do we know "long long" > > > >(1) is available widely enough (I think it is from c99)? > > > >(2) is sufficiently wide so that we can safely cast off_t to? > > > >(3) will stay to be

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-12 Thread Jeff King
On Mon, Nov 12, 2018 at 02:03:20PM +0900, Junio C Hamano wrote: > > + } else if (!strcmp(name, "objectsize")) { > > v->value = oi->size; > > v->s = xstrfmt("%lu", oi->size); > > This is not a suggestion but is a genuine question, but I wonder if

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-12 Thread Johannes Schindelin
Hi, On Mon, 12 Nov 2018, Junio C Hamano wrote: > Olga Telezhnaya writes: > > > @@ -876,11 +882,13 @@ static void grab_common_values(struct atom_value > > *val, int deref, struct expand_ > > name++; > > if (!strcmp(name, "objecttype")) > >

Re: [RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-11 Thread Junio C Hamano
Olga Telezhnaya writes: > @@ -876,11 +882,13 @@ static void grab_common_values(struct atom_value *val, > int deref, struct expand_ > name++; > if (!strcmp(name, "objecttype")) > v->s = xstrdup(type_name(oi->type)); > - else

[RFC PATCH 1/5] ref-filter: add objectsize:disk option

2018-11-08 Thread Olga Telezhnaya
Add new formatting option objectsize:disk to know exact size that object takes up on disk. Signed-off-by: Olga Telezhnaia --- ref-filter.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index