]> git.ipfire.org Git - thirdparty/git.git/blobdiff - notes-utils.c
t: local VAR="VAL" (quote positional parameters)
[thirdparty/git.git] / notes-utils.c
index 97c031c26ec7c7c2fdade8478fa039d470820bad..6197a5a4556400603ed7e669d5cccb0db4089e21 100644 (file)
@@ -5,7 +5,6 @@
 #include "gettext.h"
 #include "refs.h"
 #include "notes-utils.h"
-#include "repository.h"
 #include "strbuf.h"
 
 void create_notes_commit(struct repository *r,
@@ -112,6 +111,8 @@ static int notes_rewrite_config(const char *k, const char *v,
                }
                return 0;
        } else if (!c->refs_from_env && !strcmp(k, "notes.rewriteref")) {
+               if (!v)
+                       return config_error_nonbool(k);
                /* note that a refs/ prefix is implied in the
                 * underlying for_each_glob_ref */
                if (starts_with(v, "refs/notes/"))