Thread (53 messages) flat view 53 messages, 4 authors, 2016-06-15

Re: [PATCH 01/14] advice: Introduce error_resolve_conflict

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:51:33

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help