aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/tag.c')
-rw-r--r--builtin/tag.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index d3e0943b73..4742b27d16 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -17,8 +17,9 @@
#include "gettext.h"
#include "hex.h"
#include "refs.h"
+#include "object-file.h"
#include "object-name.h"
-#include "object-store-ll.h"
+#include "object-store.h"
#include "path.h"
#include "tag.h"
#include "parse-options.h"
@@ -172,7 +173,7 @@ static int do_sign(struct strbuf *buffer, struct object_id **compat_oid,
if (compat) {
const struct git_hash_algo *algo = the_repository->hash_algo;
- if (convert_object_file(&compat_buf, algo, compat,
+ if (convert_object_file(the_repository ,&compat_buf, algo, compat,
buffer->buf, buffer->len, OBJ_TAG, 1))
goto out;
if (sign_buffer(&compat_buf, &compat_sig, keyid))
@@ -479,9 +480,16 @@ int cmd_tag(int argc,
int edit_flag = 0;
struct option options[] = {
OPT_CMDMODE('l', "list", &cmdmode, N_("list tag names"), 'l'),
- { OPTION_INTEGER, 'n', NULL, &filter.lines, N_("n"),
- N_("print <n> lines of each tag message"),
- PARSE_OPT_OPTARG, NULL, 1 },
+ {
+ .type = OPTION_INTEGER,
+ .short_name = 'n',
+ .value = &filter.lines,
+ .precision = sizeof(filter.lines),
+ .argh = N_("n"),
+ .help = N_("print <n> lines of each tag message"),
+ .flags = PARSE_OPT_OPTARG,
+ .defval = 1,
+ },
OPT_CMDMODE('d', "delete", &cmdmode, N_("delete tags"), 'd'),
OPT_CMDMODE('v', "verify", &cmdmode, N_("verify tags"), 'v'),
@@ -513,9 +521,14 @@ int cmd_tag(int argc,
N_("do not output a newline after empty formatted refs")),
OPT_REF_SORT(&sorting_options),
{
- OPTION_CALLBACK, 0, "points-at", &filter.points_at, N_("object"),
- N_("print only tags of the object"), PARSE_OPT_LASTARG_DEFAULT,
- parse_opt_object_name, (intptr_t) "HEAD"
+ .type = OPTION_CALLBACK,
+ .long_name = "points-at",
+ .value = &filter.points_at,
+ .argh = N_("object"),
+ .help = N_("print only tags of the object"),
+ .flags = PARSE_OPT_LASTARG_DEFAULT,
+ .callback = parse_opt_object_name,
+ .defval = (intptr_t) "HEAD",
},
OPT_STRING( 0 , "format", &format.format, N_("format"),
N_("format to use for the output")),