send-email: avoid questions when user has an ident
[gitweb.git] / advice.c
index 01130e54e7b270df7f535fb815dba25ddb72ec1a..edfbd4a6fb01a6905671d6d842d22c4869fad729 100644 (file)
--- a/advice.c
+++ b/advice.c
@@ -1,6 +1,9 @@
 #include "cache.h"
 
 int advice_push_nonfastforward = 1;
+int advice_push_non_ff_current = 1;
+int advice_push_non_ff_default = 1;
+int advice_push_non_ff_matching = 1;
 int advice_status_hints = 1;
 int advice_commit_before_merge = 1;
 int advice_resolve_conflict = 1;
@@ -12,6 +15,9 @@ static struct {
        int *preference;
 } advice_config[] = {
        { "pushnonfastforward", &advice_push_nonfastforward },
+       { "pushnonffcurrent", &advice_push_non_ff_current },
+       { "pushnonffdefault", &advice_push_non_ff_default },
+       { "pushnonffmatching", &advice_push_non_ff_matching },
        { "statushints", &advice_status_hints },
        { "commitbeforemerge", &advice_commit_before_merge },
        { "resolveconflict", &advice_resolve_conflict },
@@ -26,7 +32,7 @@ void advise(const char *advice, ...)
        const char *cp, *np;
 
        va_start(params, advice);
-       strbuf_addf(&buf, advice, params);
+       strbuf_vaddf(&buf, advice, params);
        va_end(params);
 
        for (cp = buf.buf; *cp; cp = np) {