• Jeff King's avatar
    revision: drop useless string offset when parsing "--pretty" · ae18165f
    Jeff King authored
    Once upon a time, we parsed pretty options by looking for
    "--pretty" at the start of the string, and then feeding the
    rest (including an "=") to get_commit_format. Later, commit
    48ded916 (log --pretty: do not accept bogus "--prettyshort",
    2008-05-25) split this into a separate check for "--pretty"
    versus "--pretty=".
    However, when parsing "--pretty", we still passed "arg+8" to
    get_commit_format. This is useless, since it will always
    point to the NUL terminator at the end of the string. We can
    simply pass NULL instead; both parameters are treated the
    same by get_commit_format.
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
revision.c 88.6 KB