• J
    fsck: remove redundant parse_tree() invocation · ad2db403
    Jonathan Tan 提交于
    If obj->type == OBJ_TREE, an invocation of fsck_walk() will invoke
    parse_tree() and return quickly if that returns nonzero, so it is of no
    use for traverse_one_object() to invoke parse_tree() in this situation
    before invoking fsck_walk(). Remove that code.
    
    The behavior of traverse_one_object() is changed slightly in that it now
    returns -1 instead of 1 in the case that parse_tree() fails, but this is
    not an issue because its only caller (traverse_reachable) does not care
    about the value as long as it is nonzero.
    
    This code was introduced in commit 271b8d25 ("builtin-fsck: move away
    from object-refs to fsck_walk", 2008-02-25). The same issue existed in
    that commit.
    Signed-off-by: NJonathan Tan <jonathantanmy@google.com>
    Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    ad2db403
fsck.c 19.4 KB