t1007: add hash-object --literally tests
[gitweb.git] / advice.c
index c50ebdf5fe82d88b901ca26668806c94e03fbb37..3b8bf3c6da6afdd5ef4cfcc77131690ccbbf3757 100644 (file)
--- a/advice.c
+++ b/advice.c
@@ -61,9 +61,12 @@ void advise(const char *advice, ...)
 
 int git_default_advice_config(const char *var, const char *value)
 {
-       const char *k = skip_prefix(var, "advice.");
+       const char *k;
        int i;
 
+       if (!skip_prefix(var, "advice.", &k))
+               return 0;
+
        for (i = 0; i < ARRAY_SIZE(advice_config); i++) {
                if (strcmp(k, advice_config[i].name))
                        continue;
@@ -83,8 +86,7 @@ int error_resolve_conflict(const char *me)
                 * other commands doing a merge do.
                 */
                advise(_("Fix them up in the work tree, and then use 'git add/rm <file>'\n"
-                        "as appropriate to mark resolution and make a commit, or use\n"
-                        "'git commit -a'."));
+                        "as appropriate to mark resolution and make a commit."));
        return -1;
 }