Junio C Hamano <gitster@xxxxxxxxx> writes: > diff --git a/refs.c b/refs.c > index 8d3c502..abd5623 100644 > --- a/refs.c > +++ b/refs.c > @@ -717,19 +717,23 @@ int check_ref_format(const char *ref) > return CHECK_REF_FORMAT_ERROR; > } > > + last = ch; > /* scan the rest of the path component */ > while ((ch = *cp++) != 0) { > bad_type = bad_ref_char(ch); > - if (bad_type) { > + if (bad_type) > return CHECK_REF_FORMAT_ERROR; > - } > if (ch == '/') > break; > - if (ch == '.' && *cp == '.') > + if (last == '.' && ch == '.') > + return CHECK_REF_FORMAT_ERROR; > + if (last == '@' && ch == '{') > return CHECK_REF_FORMAT_ERROR; Oops; here I need: + last = ch; here. > } -- 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