mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 14:56:15 +02:00
GitInputScheme: Add some progress indication
This commit is contained in:
parent
120bec5595
commit
8a43eaaf85
1 changed files with 7 additions and 3 deletions
|
@ -460,6 +460,8 @@ struct GitInputScheme : InputScheme
|
||||||
return *revCount;
|
return *revCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Activity act(*logger, lvlChatty, actUnknown, fmt("getting Git revision count of '%s'", repoInfo.url));
|
||||||
|
|
||||||
auto revCount = std::stoull(
|
auto revCount = std::stoull(
|
||||||
runProgram("git", true,
|
runProgram("git", true,
|
||||||
{ "-C", repoDir, "--git-dir", repoInfo.gitDir, "rev-list", "--count", rev.gitRev() }));
|
{ "-C", repoDir, "--git-dir", repoInfo.gitDir, "rev-list", "--count", rev.gitRev() }));
|
||||||
|
@ -659,15 +661,17 @@ struct GitInputScheme : InputScheme
|
||||||
{
|
{
|
||||||
throw Error(
|
throw Error(
|
||||||
"Cannot find Git revision '%s' in ref '%s' of repository '%s'! "
|
"Cannot find Git revision '%s' in ref '%s' of repository '%s'! "
|
||||||
"Please make sure that the " ANSI_BOLD "rev" ANSI_NORMAL " exists on the "
|
"Please make sure that the " ANSI_BOLD "rev" ANSI_NORMAL " exists on the "
|
||||||
ANSI_BOLD "ref" ANSI_NORMAL " you've specified or add " ANSI_BOLD
|
ANSI_BOLD "ref" ANSI_NORMAL " you've specified or add " ANSI_BOLD
|
||||||
"allRefs = true;" ANSI_NORMAL " to " ANSI_BOLD "fetchGit" ANSI_NORMAL ".",
|
"allRefs = true;" ANSI_NORMAL " to " ANSI_BOLD "fetchGit" ANSI_NORMAL ".",
|
||||||
input.getRev()->gitRev(),
|
input.getRev()->gitRev(),
|
||||||
ref,
|
ref,
|
||||||
repoInfo.url
|
repoInfo.url
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Activity act(*logger, lvlChatty, actUnknown, fmt("copying Git tree '%s' to the store", input.to_string()));
|
||||||
|
|
||||||
if (repoInfo.submodules) {
|
if (repoInfo.submodules) {
|
||||||
Path tmpGitDir = createTempDir();
|
Path tmpGitDir = createTempDir();
|
||||||
AutoDelete delTmpGitDir(tmpGitDir, true);
|
AutoDelete delTmpGitDir(tmpGitDir, true);
|
||||||
|
|
Loading…
Reference in a new issue