зеркало из https://github.com/microsoft/git.git
Merge branch 'jt/trace-error-on-warning'
Like die() and error(), a call to warning() will also trigger a trace2 event. * jt/trace-error-on-warning: usage: add trace2 entry upon warning()
This commit is contained in:
Коммит
2aeafbc896
|
@ -466,7 +466,7 @@ completed.)
|
|||
|
||||
`"error"`::
|
||||
This event is emitted when one of the `error()`, `die()`,
|
||||
or `usage()` functions are called.
|
||||
`warning()`, or `usage()` functions are called.
|
||||
+
|
||||
------------
|
||||
{
|
||||
|
|
6
usage.c
6
usage.c
|
@ -81,6 +81,12 @@ static void error_builtin(const char *err, va_list params)
|
|||
|
||||
static void warn_builtin(const char *warn, va_list params)
|
||||
{
|
||||
/*
|
||||
* We call this trace2 function first and expect it to va_copy 'params'
|
||||
* before using it (because an 'ap' can only be walked once).
|
||||
*/
|
||||
trace2_cmd_error_va(warn, params);
|
||||
|
||||
vreportf("warning: ", warn, params);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче