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

Commits on Oct 30, 2019

  1. Replace git show with git log

    git show seems to print the entire tag message when being called on a tag
    instead of a commit. git log instead always prints the correct timestamp
    in my tests.
    The error nix prints is: `error: stoull`.
    dasJ committed Oct 30, 2019
    Copy the full SHA
    2d1d1e3 View commit details
  2. Merge pull request #3178 from helsinki-systems/flakes-git-log

    [flakes] Replace git show with git log
    edolstra authored Oct 30, 2019
    Copy the full SHA
    e34b317 View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/libexpr/primops/fetchGit.cc
4 changes: 2 additions & 2 deletions src/libexpr/primops/fetchGit.cc
Original file line number Diff line number Diff line change
@@ -149,7 +149,7 @@ GitInfo exportGit(ref<Store> store, std::string uri,
gitInfo.revCount = haveCommits ? std::stoull(runProgram("git", true, { "-C", uri, "rev-list", "--count", "HEAD" })) : 0;
// FIXME: maybe we should use the timestamp of the last
// modified dirty file?
gitInfo.lastModified = haveCommits ? std::stoull(runProgram("git", true, { "-C", uri, "show", "-s", "--format=%ct", "HEAD" })) : 0;
gitInfo.lastModified = haveCommits ? std::stoull(runProgram("git", true, { "-C", uri, "log", "-1", "--format=%ct", "HEAD" })) : 0;

return gitInfo;
}
@@ -267,7 +267,7 @@ GitInfo exportGit(ref<Store> store, std::string uri,
gitInfo.storePath = store->addToStore(name, tmpDir);

gitInfo.revCount = std::stoull(runProgram("git", true, { "-C", repoDir, "rev-list", "--count", gitInfo.rev.gitRev() }));
gitInfo.lastModified = std::stoull(runProgram("git", true, { "-C", repoDir, "show", "-s", "--format=%ct", gitInfo.rev.gitRev() }));
gitInfo.lastModified = std::stoull(runProgram("git", true, { "-C", repoDir, "log", "-1", "--format=%ct", gitInfo.rev.gitRev() }));

cacheGitInfo(name, gitInfo);