Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4e840fc5410b
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6bff1aa46dba
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Oct 31, 2019

  1. Minor updates to inline comments

    Add missing docstring on InstallableCommand. Also, some of these were wrapped
    when they're right next to a line longer than the unwrapped line, so we can just
    unwrap them to save vertical space.
    bhipple committed Oct 31, 2019
    Copy the full SHA
    80d5ec6 View commit details
  2. Merge pull request #3182 from bhipple/fixup/comments

    Minor updates to inline comments
    edolstra authored Oct 31, 2019
    Copy the full SHA
    6bff1aa View commit details
Showing with 10 additions and 18 deletions.
  1. +1 −3 src/libexpr/primops/fetchGit.cc
  2. +4 −8 src/libstore/build.cc
  3. +1 −2 src/libstore/local-store.cc
  4. +2 −4 src/nix-store/nix-store.cc
  5. +2 −1 src/nix/command.hh
4 changes: 1 addition & 3 deletions src/libexpr/primops/fetchGit.cc
Original file line number Diff line number Diff line change
@@ -45,9 +45,7 @@ GitInfo exportGit(ref<Store> store, const std::string & uri,

if (!clean) {

/* This is an unclean working tree. So copy all tracked
files. */

/* This is an unclean working tree. So copy all tracked files. */
GitInfo gitInfo;
gitInfo.rev = "0000000000000000000000000000000000000000";
gitInfo.shortRev = std::string(gitInfo.rev, 0, 7);
12 changes: 4 additions & 8 deletions src/libstore/build.cc
Original file line number Diff line number Diff line change
@@ -3264,8 +3264,7 @@ void DerivationGoal::registerOutputs()
i.second.parseHashInfo(recursive, h);

if (!recursive) {
/* The output path should be a regular file without
execute permission. */
/* The output path should be a regular file without execute permission. */
if (!S_ISREG(st.st_mode) || (st.st_mode & S_IXUSR) != 0)
throw BuildError(
format("output path '%1%' should be a non-executable regular file") % path);
@@ -3343,8 +3342,7 @@ void DerivationGoal::registerOutputs()
% drvPath % path);
}

/* Since we verified the build, it's now ultimately
trusted. */
/* Since we verified the build, it's now ultimately trusted. */
if (!info.ultimate) {
info.ultimate = true;
worker.store.signPathInfo(info);
@@ -3354,8 +3352,7 @@ void DerivationGoal::registerOutputs()
continue;
}

/* For debugging, print out the referenced and unreferenced
paths. */
/* For debugging, print out the referenced and unreferenced paths. */
for (auto & i : inputPaths) {
PathSet::iterator j = references.find(i);
if (j == references.end())
@@ -3413,8 +3410,7 @@ void DerivationGoal::registerOutputs()
}
}

/* If this is the first round of several, then move the output out
of the way. */
/* If this is the first round of several, then move the output out of the way. */
if (nrRounds > 1 && curRound == 1 && curRound < nrRounds && keepPreviousRound) {
for (auto & i : drv->outputs) {
Path prev = i.second.path + checkSuffix;
3 changes: 1 addition & 2 deletions src/libstore/local-store.cc
Original file line number Diff line number Diff line change
@@ -937,8 +937,7 @@ void LocalStore::registerValidPaths(const ValidPathInfos & infos)
not be valid yet. */
for (auto & i : infos)
if (isDerivation(i.path)) {
// FIXME: inefficient; we already loaded the
// derivation in addValidPath().
// FIXME: inefficient; we already loaded the derivation in addValidPath().
Derivation drv = readDerivation(realStoreDir + "/" + baseNameOf(i.path));
checkDerivationOutputs(i.path, drv);
}
6 changes: 2 additions & 4 deletions src/nix-store/nix-store.cc
Original file line number Diff line number Diff line change
@@ -632,8 +632,7 @@ static void opDelete(Strings opFlags, Strings opArgs)
}


/* Dump a path as a Nix archive. The archive is written to standard
output. */
/* Dump a path as a Nix archive. The archive is written to stdout */
static void opDump(Strings opFlags, Strings opArgs)
{
if (!opFlags.empty()) throw UsageError("unknown flag");
@@ -646,8 +645,7 @@ static void opDump(Strings opFlags, Strings opArgs)
}


/* Restore a value from a Nix archive. The archive is read from
standard input. */
/* Restore a value from a Nix archive. The archive is read from stdin. */
static void opRestore(Strings opFlags, Strings opArgs)
{
if (!opFlags.empty()) throw UsageError("unknown flag");
3 changes: 2 additions & 1 deletion src/nix/command.hh
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ struct Command : virtual Args

class Store;

/* A command that require a Nix store. */
/* A command that requires a Nix store. */
struct StoreCommand : virtual Command
{
StoreCommand();
@@ -115,6 +115,7 @@ private:
std::vector<std::string> _installables;
};

/* A command that operates on exactly one "installable" */
struct InstallableCommand : virtual Args, SourceExprCommand
{
std::shared_ptr<Installable> installable;