From 2b4ddbbf47320bb9a0b01a74c1ec1d30687d79ee Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 1 Apr 2025 22:56:14 +0200 Subject: [PATCH] Make Git error messages more consistent (cherry picked from commit f15681df26bbbf246c226530d1ab814a172a7e87) --- src/libfetchers/git.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index 6b82d9ae3..6f6fdd3a3 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -537,7 +537,7 @@ struct GitInputScheme : InputScheme return [repoPath{std::move(repoPath)}](const CanonPath & path) -> RestrictedPathError { if (nix::pathExists(repoPath / path.rel())) 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" "To make it visible to Nix, run:\n" "\n" @@ -545,7 +545,7 @@ struct GitInputScheme : InputScheme path.rel(), repoPath); 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); }; }