usage.c: don't copy/paste the same comment three times

In ee4512ed481 (trace2: create new combined trace facility, 2019-02-22) we started with two copies of this comment, 0ee10fd1296 (usage: add trace2 entry upon warning(), 2020-11-23) added a third. Let's instead add an earlier comment that applies to all these mostly-the-same functions. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Apr 13, 2021 at 11:08 UTC c00c7382ddc1e3f2d773b14366023abf53ecce2c
1 file changed +5 -12
usage.c
+5 -12
@@ -55,12 +55,13 @@ static NORETURN void usage_builtin(const char *err, va_list params)
55 exit(129);
56 }
57
58 +/*
59 + * We call trace2_cmd_error_va() in the below functions first and
60 + * expect it to va_copy 'params' before using it (because an 'ap' can
61 + * only be walked once).
62 + */
63 static NORETURN void die_builtin(const char *err, va_list params)
64 {
60 - /*
61 - * We call this trace2 function first and expect it to va_copy 'params'
62 - * before using it (because an 'ap' can only be walked once).
63 - */
65 trace2_cmd_error_va(err, params);
66
67 vreportf("fatal: ", err, params);
@@ -70,10 +71,6 @@ static NORETURN void die_builtin(const char *err, va_list params)
71
72 static void error_builtin(const char *err, va_list params)
73 {
73 - /*
74 - * We call this trace2 function first and expect it to va_copy 'params'
75 - * before using it (because an 'ap' can only be walked once).
76 - */
74 trace2_cmd_error_va(err, params);
75
76 vreportf("error: ", err, params);
@@ -81,10 +78,6 @@ static void error_builtin(const char *err, va_list params)
78
79 static void warn_builtin(const char *warn, va_list params)
80 {
84 - /*
85 - * We call this trace2 function first and expect it to va_copy 'params'
86 - * before using it (because an 'ap' can only be walked once).
87 - */
81 trace2_cmd_error_va(warn, params);
82
83 vreportf("warning: ", warn, params);