1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 18:41:47 +02:00

* Simplification: registerSubstitutes -> registerSubstitute. We no

longer need the former since there we no longer have the
  substitutes-rev table (which triggered a O(n^2) cost in updating
  them).
This commit is contained in:
Eelco Dolstra 2005-01-25 20:27:40 +00:00
parent a9340fa672
commit 2a2756b856
4 changed files with 12 additions and 24 deletions

View file

@ -170,7 +170,6 @@ static void opSubstitute(Strings opFlags, Strings opArgs)
if (!opArgs.empty())
throw UsageError("no arguments expected");
SubstitutePairs subPairs;
Transaction txn;
createStoreTransaction(txn);
@ -196,12 +195,10 @@ static void opSubstitute(Strings opFlags, Strings opArgs)
references.insert(s);
}
if (!cin || cin.eof()) throw Error("missing input");
subPairs.push_back(pair<Path, Substitute>(srcPath, sub));
registerSubstitute(txn, srcPath, sub);
setReferences(txn, srcPath, references);
}
registerSubstitutes(txn, subPairs);
txn.commit();
}