Since refs are classified based on their prefix but namespaces have their own prefix, it's necessary to skip that prefix to classify their remaining prefix. --- refs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/refs.c b/refs.c index ba22f4a..2e8bace 100644 --- a/refs.c +++ b/refs.c @@ -699,6 +699,7 @@ int should_autocreate_reflog(const char *refname) case LOG_REFS_ALWAYS: return 1; case LOG_REFS_NORMAL: + (void) skip_namespace(refname, &refname); return starts_with(refname, "refs/heads/") || starts_with(refname, "refs/remotes/") || starts_with(refname, "refs/notes/") || -- 2.9.0