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: fa125b9b28be
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ffcf9d24a68f
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Mar 2, 2017

  1. Copy the full SHA
    fbf17f1 View commit details
  2. Copy the full SHA
    ffcf9d2 View commit details
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/libexpr/primops/fetchgit.cc
10 changes: 6 additions & 4 deletions src/libexpr/primops/fetchgit.cc
Original file line number Diff line number Diff line change
@@ -58,12 +58,14 @@ static void prim_fetchgit(EvalState & state, const Pos & pos, Value * * args, Va

for (auto & attr : *args[0]->attrs) {
string name(attr.name);
if (name == "url")
url = state.forceStringNoCtx(*attr.value, *attr.pos);
else if (name == "rev")
if (name == "url") {
PathSet context;
url = state.coerceToString(*attr.pos, *attr.value, context, false, false);
if (hasPrefix(url, "/")) url = "file://" + url;
} else if (name == "rev")
rev = state.forceStringNoCtx(*attr.value, *attr.pos);
else
throw EvalError(format("unsupported argument ‘%1%’ to ‘fetchgit’, at %3%") % attr.name % attr.pos);
throw EvalError("unsupported argument ‘%s’ to ‘fetchgit’, at %s", attr.name, *attr.pos);
}

if (url.empty())