summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Jonathan Tan <jonathantanmy@google.com>2020-11-23 12:45:22 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-24 17:39:38 -0800
commit0ee10fd12968b78dbd1ccbba108599a24f31f70b (patch)
treee2d8e06bd9b321789d5b39e38af9ed18f33ec26a /Documentation
parentGit 2.29.2 (diff)
downloadtgif-0ee10fd12968b78dbd1ccbba108599a24f31f70b.tar.xz
usage: add trace2 entry upon warning()
Emit a trace2 error event whenever warning() is called, just like when die(), error(), or usage() is called. This helps debugging issues that would trigger warnings but not errors. In particular, this might have helped debugging an issue I encountered with commit graphs at $DAYJOB [1]. There is a tradeoff between including potentially relevant messages and cluttering up the trace output produced. I think that warning() messages should be included in traces, because by its nature, Git is used over multiple invocations of the Git tool, and a failure (currently traced) in a Git invocation might be caused by an unexpected interaction in a previous Git invocation that only has a warning (currently untraced) as a symptom - as is the case in [1]. [1] https://lore.kernel.org/git/20200629220744.1054093-1-jonathantanmy@google.com/ Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/technical/api-trace2.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/technical/api-trace2.txt b/Documentation/technical/api-trace2.txt
index 6b6085585d..c65ffafc48 100644
--- a/Documentation/technical/api-trace2.txt
+++ b/Documentation/technical/api-trace2.txt
@@ -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.
+
------------
{