diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-02-01 23:54:20 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-02-01 23:54:20 +0100 |
commit | 887730aab39dd63a37d49d72a07c6441ea3b2f92 (patch) | |
tree | 9bda18dac5be9832ea797a73fe375829ba9f9785 /src/nix/flake.cc | |
parent | b9d64f931893120834fa54ebf084764d2e22ba33 (diff) |
Remove superfluous TreeInfo::rev field
Diffstat (limited to 'src/nix/flake.cc')
-rw-r--r-- | src/nix/flake.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc index d3c03e214..7924cec7c 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -84,8 +84,8 @@ static void printFlakeInfo(const Store & store, const Flake & flake) if (flake.description) std::cout << fmt("Description: %s\n", *flake.description); std::cout << fmt("Path: %s\n", store.printStorePath(flake.sourceInfo->storePath)); - if (flake.sourceInfo->info.rev) - std::cout << fmt("Revision: %s\n", flake.sourceInfo->info.rev->to_string(Base16, false)); + if (auto rev = flake.resolvedRef.input->getRev()) + std::cout << fmt("Revision: %s\n", rev->to_string(Base16, false)); if (flake.sourceInfo->info.revCount) std::cout << fmt("Revisions: %s\n", *flake.sourceInfo->info.revCount); if (flake.sourceInfo->info.lastModified) @@ -100,8 +100,8 @@ static nlohmann::json flakeToJson(const Store & store, const Flake & flake) j["description"] = *flake.description; j["edition"] = flake.edition; j["url"] = flake.resolvedRef.input->to_string(); - if (flake.sourceInfo->info.rev) - j["revision"] = flake.sourceInfo->info.rev->to_string(Base16, false); + if (auto rev = flake.resolvedRef.input->getRev()) + j["revision"] = rev->to_string(Base16, false); if (flake.sourceInfo->info.revCount) j["revCount"] = *flake.sourceInfo->info.revCount; if (flake.sourceInfo->info.lastModified) |