From 2a2756b85643de6355b7b9e3cc47574e7df82303 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 25 Jan 2005 20:27:40 +0000 Subject: * 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). --- src/nix-store/main.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nix-store') diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc index 51e587255003..ed93f2065790 100644 --- a/src/nix-store/main.cc +++ b/src/nix-store/main.cc @@ -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(srcPath, sub)); + registerSubstitute(txn, srcPath, sub); setReferences(txn, srcPath, references); } - registerSubstitutes(txn, subPairs); - txn.commit(); } -- cgit 1.4.1