author | Michael J Gruber <git@drmicha.warpmail.net> | |
Mon, 11 May 2009 14:42:54 +0000 (16:42 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 14 May 2009 16:43:54 +0000 (09:43 -0700) | ||
commit | 57ffc5f85a17416a718d4e7baf71d8356c9c7808 | |
tree | 304ab7b66df7c784d81670e53603bcae372f14d3 | tree | snapshot |
parent | 1be570f4ebb5f3c4e0a56341db166a760829782a | commit | diff |
Fix behavior with non-commit upstream references
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: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c | diff | blob | history | |
t/t6040-tracking-info.sh | diff | blob | history |