Hi Jonathan,
Jonathan Nieder writes:
Ramkumar Ramachandra wrote:
quoted
--- a/advice.c
+++ b/advice.c
@@ -19,6 +19,15 @@ static struct { { "detachedhead", &advice_detached_head },
};
+static void advise(const char *advice, ...)
+{
+ va_list params;
+
+ va_start(params, advice);
+ vreportf("hint: ", advice, params);
+ va_end(params);
+}
Rather than copy+pasting this code verbatim, wouldn't it make sense to
move it and expose it through advice.h so the old call site can use
the same code?
Yes, but I was worried that I shouldn't expose it because your commit
message (2a41df) says:
It is local to revert.c for now because I am not sure this is
the right API (we may want to take an array of advice lines or a
boolean argument for easy suppression of unwanted advice).
So, is it still alright to expose it in advice.h?
For what it's worth, with that change,
Reviewed-by: Jonathan Nieder <redacted>
Thanks.
-- Ram