mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-05-30 22:49:48 +00:00
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 <vapier@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
committed by
gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
12ad396f67
commit
7cc99b24c1
+1
-1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user