mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-09 17:37:20 -06:00
refactor: use RunWithStderr for git commands (#40295)
If the stderr output is not handled, then it needs to use RunWithStderr to make sure the git error message is included in the returned error. Otherwise, when the git command fails, the error log won't show useful information. Ref: * #39795 : no useful information in log messages * https://github.com/go-gitea/gitea/pull/40160#pullrequestreview-5752720866
This commit is contained in:
@@ -92,6 +92,8 @@ conditional `UPDATE` or a lock.
|
||||
|
||||
- Pass already opened repositories down or use `git.RepositoryFromContextOrOpen`
|
||||
rather than reopening them or spawning extra `git` processes.
|
||||
- If git command stderr output is not handled by the caller, then it needs to use RunWithStderr
|
||||
to make sure the git error message is included in the returned error and displayed in the logs.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
||||
Reference in New Issue
Block a user