66089e97de
Eg, showImprecise 1 1.99 returned "1.1" rather than "2". The 9 rounded upward to 10, and that was wrongly used as the decimal, rather than carrying the 1. Sponsored-by: Jack Hill on Patreon
49 lines
2.3 KiB
Markdown
49 lines
2.3 KiB
Markdown
### Please describe the problem.
|
|
|
|
git-annex info shows wrong remote sizes. This is fairly clearly visible as the list of remotes is ordered by size, but the reported size does not match the actual size for repositories which appear to have (nearly) exactly 2 TB. Apparently, git-annex rounds the integer places independently from the decimal places, and stumbles when rounding.
|
|
|
|
|
|
### What steps will reproduce the problem?
|
|
|
|
run `git annex info .` with remotes having nearly "unit-full" usage, as in, exactly 1 or 2 tb data
|
|
|
|
### What version of git-annex are you using? On what operating system?
|
|
|
|
git-annex 8.20200330-1~bpo10+1 on a Debian buster rpi4 arm64
|
|
|
|
### Please provide any additional information below.
|
|
|
|
[[!format sh """
|
|
|
|
$ git annex info .
|
|
directory: .
|
|
local annex keys: 83900
|
|
[...]
|
|
repositories containing these files: 23
|
|
[...]
|
|
2.04 TB: 00000000-0000-0000-0000-0redacted000 -- media30
|
|
2.03 TB: 00000000-0000-0000-0000-0redacted000 -- media21
|
|
1.1 TB: 00000000-0000-0000-0000-0redacted000 -- media39
|
|
1.1 TB: 00000000-0000-0000-0000-0redacted000 -- media29
|
|
1.99 TB: 00000000-0000-0000-0000-0redacted000 -- media45
|
|
1.99 TB: 00000000-0000-0000-0000-0redacted000 -- media20
|
|
1.98 TB: 00000000-0000-0000-0000-0redacted000 -- media46
|
|
[...]
|
|
$ git annex find --in media29 --format '${bytesize}\n' | awk '{i+=$1}END{printf "%i\n", i}'
|
|
2147483647
|
|
$ echo $[2147483647/1024.]
|
|
2097151.9990234375
|
|
$ echo $[2147483647/1024./1024]
|
|
2047.9999990463257
|
|
$ echo $[2147483647/1024./1024/1024]
|
|
1.9999999990686774
|
|
"""]]
|
|
|
|
All remotes above sit on 2tb disk drives, which are filled as much as possible. For media39 and media29, apparently the integer places round downward, but the decimal places upwards, and then the rounded-to "1" which should increment the integer place, instead gets printed as decimal place.
|
|
|
|
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
|
|
|
|
|
Thank you for all your time creating and maintaining such a usefull software!
|
|
|
|
> [[fixed|done]] --[[Joey]]
|