]> git.ipfire.org Git - thirdparty/git.git/commit
tag: don't warn if target is missing but promised
authorJonathan Tan <jonathantanmy@google.com>
Fri, 13 Jul 2018 00:03:07 +0000 (17:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jul 2018 19:56:14 +0000 (12:56 -0700)
commit8c4cc326896de1a1501135c529b0596fa6327969
tree1a46a40eedfcc18270e328259b3f3fff211a5c01
parentdc0a13f6813f35bae5fd2de6af4d5524a20d5b82
tag: don't warn if target is missing but promised

deref_tag() prints a warning if the object that a tag refers to does not
exist. However, when a partial clone has an annotated tag from its
promisor remote, but not the object that it refers to, printing a
warning on such a tag is incorrect.

This occurs, for example, when the checkout that happens after a partial
clone causes some objects to be fetched - and as part of the fetch, all
local refs are read. The test included in this patch demonstrates this
situation.

Therefore, do not print a warning in this case.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5616-partial-clone.sh
tag.c