mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
treewide: replace manual MiB calculations with renderSize
(cherry picked from commit 584a8e8a00)
This commit is contained in:
parent
a5a7769d84
commit
f1b04c95ac
3 changed files with 13 additions and 11 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "nix/util/users.hh"
|
||||
#include "nix/util/fs-sink.hh"
|
||||
#include "nix/util/sync.hh"
|
||||
#include "nix/util/util.hh"
|
||||
|
||||
#include <git2/attr.h>
|
||||
#include <git2/blob.h>
|
||||
|
|
@ -517,12 +518,12 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this<GitRepoImpl>
|
|||
auto act = (Activity *) payload;
|
||||
act->result(
|
||||
resFetchStatus,
|
||||
fmt("%d/%d objects received, %d/%d deltas indexed, %.1f MiB",
|
||||
fmt("%d/%d objects received, %d/%d deltas indexed, %s",
|
||||
stats->received_objects,
|
||||
stats->total_objects,
|
||||
stats->indexed_deltas,
|
||||
stats->total_deltas,
|
||||
stats->received_bytes / (1024.0 * 1024.0)));
|
||||
renderSize(stats->received_bytes)));
|
||||
return getInterrupted() ? -1 : 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue