forked from lix-project/lix
nix flake info: Show revcount
This commit is contained in:
parent
bc259192b4
commit
50ec2bed9e
|
@ -44,6 +44,8 @@ void printFlakeInfo(Flake & flake, bool json) {
|
||||||
j["description"] = flake.description;
|
j["description"] = flake.description;
|
||||||
if (flake.sourceInfo.rev)
|
if (flake.sourceInfo.rev)
|
||||||
j["revision"] = flake.sourceInfo.rev->to_string(Base16, false);
|
j["revision"] = flake.sourceInfo.rev->to_string(Base16, false);
|
||||||
|
if (flake.sourceInfo.revCount)
|
||||||
|
j["revCount"] = *flake.sourceInfo.revCount;
|
||||||
j["path"] = flake.sourceInfo.storePath;
|
j["path"] = flake.sourceInfo.storePath;
|
||||||
std::cout << j.dump(4) << std::endl;
|
std::cout << j.dump(4) << std::endl;
|
||||||
} else {
|
} else {
|
||||||
|
@ -52,6 +54,8 @@ void printFlakeInfo(Flake & flake, bool json) {
|
||||||
std::cout << "Description: " << flake.description << "\n";
|
std::cout << "Description: " << flake.description << "\n";
|
||||||
if (flake.sourceInfo.rev)
|
if (flake.sourceInfo.rev)
|
||||||
std::cout << "Revision: " << flake.sourceInfo.rev->to_string(Base16, false) << "\n";
|
std::cout << "Revision: " << flake.sourceInfo.rev->to_string(Base16, false) << "\n";
|
||||||
|
if (flake.sourceInfo.revCount)
|
||||||
|
std::cout << "Revcount: " << *flake.sourceInfo.revCount << "\n";
|
||||||
std::cout << "Path: " << flake.sourceInfo.storePath << "\n";
|
std::cout << "Path: " << flake.sourceInfo.storePath << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue