mirror of
https://github.com/NixOS/nix
synced 2025-06-27 12:41:15 +02:00
Make Git error messages more consistent
(cherry picked from commit f15681df26
)
This commit is contained in:
parent
d653225a24
commit
2b4ddbbf47
1 changed files with 2 additions and 2 deletions
|
@ -537,7 +537,7 @@ struct GitInputScheme : InputScheme
|
||||||
return [repoPath{std::move(repoPath)}](const CanonPath & path) -> RestrictedPathError {
|
return [repoPath{std::move(repoPath)}](const CanonPath & path) -> RestrictedPathError {
|
||||||
if (nix::pathExists(repoPath / path.rel()))
|
if (nix::pathExists(repoPath / path.rel()))
|
||||||
return RestrictedPathError(
|
return RestrictedPathError(
|
||||||
"File '%1%' in the repository %2% is not tracked by Git.\n"
|
"Path '%1%' in the repository %2% is not tracked by Git.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"To make it visible to Nix, run:\n"
|
"To make it visible to Nix, run:\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -545,7 +545,7 @@ struct GitInputScheme : InputScheme
|
||||||
path.rel(),
|
path.rel(),
|
||||||
repoPath);
|
repoPath);
|
||||||
else
|
else
|
||||||
return RestrictedPathError("path '%s' does not exist in Git repository %s", path, repoPath);
|
return RestrictedPathError("Path '%s' does not exist in Git repository %s.", path.rel(), repoPath);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue