Imported Upstream version 2.27.0
[platform/upstream/git.git] / builtin / tag.c
index e0a4c25..5cbd80d 100644 (file)
@@ -17,7 +17,7 @@
 #include "diff.h"
 #include "revision.h"
 #include "gpg-interface.h"
-#include "sha1-array.h"
+#include "oid-array.h"
 #include "column.h"
 #include "ref-filter.h"
 
@@ -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"
@@ -409,8 +410,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
                OPT_GROUP(N_("Tag creation options")),
                OPT_BOOL('a', "annotate", &annotate,
                                        N_("annotated tag, needs a message")),
-               { OPTION_CALLBACK, 'm', "message", &msg, N_("message"),
-                 N_("tag message"), PARSE_OPT_NONEG, parse_msg_arg },
+               OPT_CALLBACK_F('m', "message", &msg, N_("message"),
+                              N_("tag message"), PARSE_OPT_NONEG, parse_msg_arg),
                OPT_FILENAME('F', "file", &msgfile, N_("read message from file")),
                OPT_BOOL('e', "edit", &edit_flag, N_("force edit of tag message")),
                OPT_BOOL('s', "sign", &opt.sign, N_("annotated and GPG-signed tag")),
@@ -484,7 +485,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
        }
        if (!sorting)
                sorting = ref_default_sorting();
-       sorting->ignore_case = icase;
+       ref_sorting_icase_all(sorting, icase);
        filter.ignore_case = icase;
        if (cmdmode == 'l') {
                int ret;