From 7cc99b24c1869d54168708a2df6e6f936c36f980 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 12 May 2026 12:19:59 -0400 Subject: [PATCH] git_config: fix error message command output str() inside an f-string is redundant. Actually join the array together as a string to show a proper error message, and include the full command line, not the extra options passed in. Before: error.GitError: git config ('--null', '--list'): fatal: unable to read config file 'xxx': No such file or directory After: error.GitError: git config --system --includes --null --list: fatal: unable to read config file 'xxx': No such file or directory Change-Id: I8983389aa2e0de7808991e73e636b77810f04c4b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/582341 Commit-Queue: Mike Frysinger Tested-by: Mike Frysinger Reviewed-by: Gavin Mak --- git_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_config.py b/git_config.py index e80a0322d..d2c88514b 100644 --- a/git_config.py +++ b/git_config.py @@ -438,7 +438,7 @@ class GitConfig: if p.Wait() == 0: return p.stdout else: - raise GitError(f"git config {str(args)}: {p.stderr}") + raise GitError(f"git {' '.join(command)}: {p.stderr}") class RepoConfig(GitConfig):