aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/fetchgit.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-10-30 10:05:43 +0100
committerEelco Dolstra <edolstra@gmail.com>2017-10-30 10:22:58 +0100
commitf25791c196e7bcf76aa76e143a679fe731f77513 (patch)
tree2f8ea9e69a90ec22ffa1aba4c2cf5d6d6440c350 /src/libexpr/primops/fetchgit.cc
parent65b5f177b5fbb1b0778ede047a13a3cee9c59cfe (diff)
builtins.fetchgit: Don't mess up the progress indicator
Diffstat (limited to 'src/libexpr/primops/fetchgit.cc')
-rw-r--r--src/libexpr/primops/fetchgit.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libexpr/primops/fetchgit.cc b/src/libexpr/primops/fetchgit.cc
index adc587702..4c5799bfe 100644
--- a/src/libexpr/primops/fetchgit.cc
+++ b/src/libexpr/primops/fetchgit.cc
@@ -29,8 +29,6 @@ Path exportGit(ref<Store> store, const std::string & uri,
runProgram("git", true, { "init", "--bare", cacheDir });
}
- //Activity act(*logger, lvlInfo, format("fetching Git repository '%s'") % uri);
-
std::string localRef = hashString(htSHA256, fmt("%s-%s", uri, ref)).to_string(Base32, false);
Path localRefFile = cacheDir + "/refs/heads/" + localRef;
@@ -42,7 +40,11 @@ Path exportGit(ref<Store> store, const std::string & uri,
if (stat(localRefFile.c_str(), &st) != 0 ||
st.st_mtime < now - settings.tarballTtl)
{
- runProgram("git", true, { "-C", cacheDir, "fetch", "--force", "--", uri, ref + ":" + localRef });
+ Activity act(*logger, lvlTalkative, actUnknown, fmt("fetching Git repository '%s'", uri));
+
+ // FIXME: git stderr messes up our progress indicator, so
+ // we're using --quiet for now. Should process its stderr.
+ runProgram("git", true, { "-C", cacheDir, "fetch", "--quiet", "--force", "--", uri, ref + ":" + localRef });
struct timeval times[2];
times[0].tv_sec = now;