diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-26T19·14-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-26T19·14-0400 |
commit | 8c7910083976e255300efa797030448f5a1cb864 (patch) | |
tree | afbd7a37d0724feb408a2d025364ed3938b5673a /src/nix-store | |
parent | aa115e22df1c80e8878237a9e704d7d70783a243 (diff) | |
parent | 3a4623afbbc1bff85bde33167d36e8c5a4a3df0d (diff) |
Merge branch 'master' into no-manifests
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/dotgraph.hh | 5 | ||||
-rw-r--r-- | src/nix-store/nix-store.cc | 10 | ||||
-rw-r--r-- | src/nix-store/xmlgraph.hh | 5 |
3 files changed, 4 insertions, 16 deletions
diff --git a/src/nix-store/dotgraph.hh b/src/nix-store/dotgraph.hh index 2318e2fde48d..68410d84156d 100644 --- a/src/nix-store/dotgraph.hh +++ b/src/nix-store/dotgraph.hh @@ -1,5 +1,4 @@ -#ifndef __DOTGRAPH_H -#define __DOTGRAPH_H +#pragma once #include "types.hh" @@ -8,5 +7,3 @@ namespace nix { void printDotGraph(const PathSet & roots); } - -#endif /* !__DOTGRAPH_H */ diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 47c76693f1dc..941301d2e7a1 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -746,18 +746,12 @@ static void showOptimiseStats(OptimiseStats & stats) files with the same contents. */ static void opOptimise(Strings opFlags, Strings opArgs) { - if (!opArgs.empty()) + if (!opArgs.empty() || !opFlags.empty()) throw UsageError("no arguments expected"); - bool dryRun = false; - - foreach (Strings::iterator, i, opFlags) - if (*i == "--dry-run") dryRun = true; - else throw UsageError(format("unknown flag `%1%'") % *i); - OptimiseStats stats; try { - ensureLocalStore().optimiseStore(dryRun, stats); + ensureLocalStore().optimiseStore(stats); } catch (...) { showOptimiseStats(stats); throw; diff --git a/src/nix-store/xmlgraph.hh b/src/nix-store/xmlgraph.hh index 2f9908c43665..c2216c5a4627 100644 --- a/src/nix-store/xmlgraph.hh +++ b/src/nix-store/xmlgraph.hh @@ -1,5 +1,4 @@ -#ifndef __XMLGRAPH_H -#define __XMLGRAPH_H +#pragma once #include "types.hh" @@ -8,5 +7,3 @@ namespace nix { void printXmlGraph(const PathSet & roots); } - -#endif /* !__XMLGRAPH_H */ |