mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 11:36:03 +01:00
getAccessorFromCommit(): Remove superfluous infoAttrs variable
This commit is contained in:
parent
2d83bc6b83
commit
2f6c865e25
1 changed files with 2 additions and 8 deletions
|
|
@ -735,13 +735,10 @@ struct GitInputScheme : InputScheme
|
|||
|
||||
auto rev = *input.getRev();
|
||||
|
||||
Attrs infoAttrs({
|
||||
{"rev", rev.gitRev()},
|
||||
{"lastModified", getLastModified(*input.settings, repoInfo, repoDir, rev)},
|
||||
});
|
||||
input.attrs.insert_or_assign("lastModified", getLastModified(*input.settings, repoInfo, repoDir, rev));
|
||||
|
||||
if (!getShallowAttr(input))
|
||||
infoAttrs.insert_or_assign("revCount", getRevCount(*input.settings, repoInfo, repoDir, rev));
|
||||
input.attrs.insert_or_assign("revCount", getRevCount(*input.settings, repoInfo, repoDir, rev));
|
||||
|
||||
printTalkative("using revision %s of repo '%s'", rev.gitRev(), repoInfo.locationToArg());
|
||||
|
||||
|
|
@ -797,9 +794,6 @@ struct GitInputScheme : InputScheme
|
|||
}
|
||||
|
||||
assert(!origRev || origRev == rev);
|
||||
if (!getShallowAttr(input))
|
||||
input.attrs.insert_or_assign("revCount", getIntAttr(infoAttrs, "revCount"));
|
||||
input.attrs.insert_or_assign("lastModified", getIntAttr(infoAttrs, "lastModified"));
|
||||
|
||||
return {accessor, std::move(input)};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue