[PATCH 1/2] strbuf: create strbuf_humanize() to show byte sizes

2013-04-10 Thread Antoine Pelisse
Currently, humanization of downloaded size is done in the same function as text formatting in 'process.c'. This is an issue if anyone else wants to use this. Separate text formatting from size simplification and make the function public in strbuf so that it can easily be used by other clients.

Re: [PATCH 1/2] strbuf: create strbuf_humanize() to show byte sizes

2013-04-10 Thread Jonathan Nieder
Antoine Pelisse wrote: Separate text formatting from size simplification and make the function public in strbuf so that it can easily be used by other clients. We now can use strbuf_humanize() for both downloaded size and download speed calculation. Sounds like a good thing to do.

Re: [PATCH 1/2] strbuf: create strbuf_humanize() to show byte sizes

2013-04-10 Thread Junio C Hamano
Antoine Pelisse apeli...@gmail.com writes: Currently, humanization of downloaded size is done in the same function as text formatting in 'process.c'. This is an issue if anyone else wants to use this. Separate text formatting from size simplification and make the function public in strbuf

Re: [PATCH 1/2] strbuf: create strbuf_humanize() to show byte sizes

2013-04-10 Thread Antoine Pelisse
On Wed, Apr 10, 2013 at 9:43 PM, Jonathan Nieder jrnie...@gmail.com wrote: Antoine Pelisse wrote: One of the drawbacks is that speed will now look like this when download is stalled: 0 bytes/s instead of 0 KiB/s. At first glance that is neither obviously a benefit nor

Re: [PATCH 1/2] strbuf: create strbuf_humanize() to show byte sizes

2013-04-10 Thread Antoine Pelisse
On Wed, Apr 10, 2013 at 9:57 PM, Junio C Hamano gits...@pobox.com wrote: Antoine Pelisse apeli...@gmail.com writes: Currently, humanization of downloaded size is done in the same function as text formatting in 'process.c'. This is an issue if anyone else wants to use this. Separate text