tag: use new advice API to check visibility
change the advise call in tag library from advise() to advise_if_enabled() to construct an example of the usage of the new API. Signed-off-by: Heba Waly <heba.waly@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b3b18d1621
commit
f665d63a91
@ -231,8 +231,9 @@ static void create_tag(const struct object_id *object, const char *object_ref,
|
||||
if (type <= OBJ_NONE)
|
||||
die(_("bad object type."));
|
||||
|
||||
if (type == OBJ_TAG && advice_nested_tag)
|
||||
advise(_(message_advice_nested_tag), tag, object_ref);
|
||||
if (type == OBJ_TAG)
|
||||
advise_if_enabled(ADVICE_NESTED_TAG, _(message_advice_nested_tag),
|
||||
tag, object_ref);
|
||||
|
||||
strbuf_addf(&header,
|
||||
"object %s\n"
|
||||
|
Reference in New Issue
Block a user