From: Michael Haggerty <mhagger@xxxxxxxxxxxx> There is no need to adjust *flags if we're just about to fail. Signed-off-by: Michael Haggerty <mhagger@xxxxxxxxxxxx> --- refs/files-backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 69ec903..60f1493 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -1542,13 +1542,13 @@ static const char *resolve_ref_1(const char *refname, return refname; } if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) { - *flags |= REF_ISBROKEN; - if (!(resolve_flags & RESOLVE_REF_ALLOW_BAD_NAME) || !refname_is_safe(refname)) { errno = EINVAL; return NULL; } + + *flags |= REF_ISBROKEN; bad_name = 1; } } -- 2.4.2.767.g62658d5-twtrsrc -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html