• J
    match_explicit_lhs: allow a "verify only" mode · 471fd3fe
    Jeff King 提交于
    The match_explicit_lhs function has all of the logic
    necessary to verify the refspecs without actually doing any
    work. This patch lets callers pass a NULL "match" pointer to
    indicate they want a "verify only" operation.
    
    For the most part, we just need to avoid writing to the NULL
    pointer. However, we also have to refactor the
    try_explicit_object_name sub-function; it indicates success by
    allocating and returning a new ref. Instead, we give it an
    "out" parameter for the match and return a numeric status.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    471fd3fe
remote.c 53.2 KB