• M
    Fix behavior with non-commit upstream references · 57ffc5f8
    Michael J Gruber 提交于
    stat_tracking_info() assumes that upstream references (as specified by
    --track or set up automatically) are commits. By calling lookup_commit()
    on them, create_objects() creates objects for them with type commit no
    matter what their real type is; this disturbs lookup_tag() later on in the
    call sequence, leading to git status, git branch -v  and git checkout
    erroring out.
    
    Fix this by using lookup_commit_reference() instead so that (annotated)
    tags can be used as upstream references.
    Signed-off-by: NMichael J Gruber <git@drmicha.warpmail.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    57ffc5f8
remote.c 32.3 KB