libutil/hash: Add default values for Hash::to_string
The sane default is to print in SRI format, and include the hash type Change-Id: I7efcb5dcfbe56c82dbf1928e2bb35cdd3ff089c6
This commit is contained in:
@@ -92,7 +92,7 @@ SV * queryReferences(char * path)
|
||||
SV * queryPathHash(char * path)
|
||||
PPCODE:
|
||||
try {
|
||||
auto s = aio().blockOn(store()->queryPathInfo(store()->parseStorePath(path)))->narHash.to_string(HashFormat::Base32, true);
|
||||
auto s = aio().blockOn(store()->queryPathInfo(store()->parseStorePath(path)))->narHash.to_string(HashFormat::Base32);
|
||||
XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0)));
|
||||
} catch (Error & e) {
|
||||
croak("%s", e.what());
|
||||
|
||||
Reference in New Issue
Block a user