diff options
| author | Justin Tobler <jltobler@gmail.com> | 2025-12-17 11:53:59 -0600 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-18 09:02:31 +0900 |
| commit | ce849b1851102d974653701564573798034492d5 (patch) | |
| tree | d05b75c1178c6e2e6420daca5dc81be139583841 /contrib/persistent-https | |
| parent | 9faaf254ba061e9fc7065f4c940c9dfcc51e6bbe (diff) | |
| download | git-ce849b1851102d974653701564573798034492d5.tar.gz git-ce849b1851102d974653701564573798034492d5.zip | |
strbuf: split out logic to humanise byte values
In a subsequent commit, byte size values displayed in table output for
the git-repo(1) "structure" subcommand will be shown in a more
human-readable format with the appropriate unit prefixes. For this
usecase, the downscaled values and unit strings must be handled
separately to ensure proper column alignment.
Split out logic from strbuf_humanise() to downscale byte values and
determine the corresponding unit prefix into a separate humanise_bytes()
function that provides seperate value and unit strings.
Note that the "byte" string in "t/helper/test-simple-ipc.c" is unmarked
for translation here so that it doesn't conflict with the newly defined
plural "byte/bytes" translation and instead uses it.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
