summaryrefslogtreecommitdiffstats
path: root/man1/git-mktag.1
blob: 56f00452816befc2f78c6e6dd492da9caffebff4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
'\" t
.\"     Title: git-mktag
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2024-04-19
.\"    Manual: Git Manual
.\"    Source: Git 2.45.0.rc0
.\"  Language: English
.\"
.TH "GIT\-MKTAG" "1" "2024\-04\-19" "Git 2\&.45\&.0\&.rc0" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-mktag \- Creates a tag object with extra validation
.SH "SYNOPSIS"
.sp
.nf
\fIgit mktag\fR
.fi
.sp
.SH "DESCRIPTION"
.sp
Reads a tag\(cqs contents on standard input and creates a tag object\&. The output is the new tag\(cqs <object> identifier\&.
.sp
This command is mostly equivalent to \fBgit-hash-object\fR(1) invoked with \fB\-t tag \-w \-\-stdin\fR\&. I\&.e\&. both of these will create and write a tag found in \fBmy\-tag\fR:
.sp
.if n \{\
.RS 4
.\}
.nf
git mktag <my\-tag
git hash\-object \-t tag \-w \-\-stdin <my\-tag
.fi
.if n \{\
.RE
.\}
.sp
The difference is that mktag will die before writing the tag if the tag doesn\(cqt pass a \fBgit-fsck\fR(1) check\&.
.sp
The "fsck" check done by mktag is stricter than what \fBgit-fsck\fR(1) would run by default in that all \fBfsck\&.<msg\-id>\fR messages are promoted from warnings to errors (so e\&.g\&. a missing "tagger" line is an error)\&.
.sp
Extra headers in the object are also an error under mktag, but ignored by \fBgit-fsck\fR(1)\&. This extra check can be turned off by setting the appropriate \fBfsck\&.<msg\-id>\fR variable:
.sp
.if n \{\
.RS 4
.\}
.nf
git \-c fsck\&.extraHeaderEntry=ignore mktag <my\-tag\-with\-headers
.fi
.if n \{\
.RE
.\}
.SH "OPTIONS"
.PP
\-\-strict
.RS 4
By default mktag turns on the equivalent of
\fBgit-fsck\fR(1)
\fB\-\-strict\fR
mode\&. Use
\fB\-\-no\-strict\fR
to disable it\&.
.RE
.SH "TAG FORMAT"
.sp
A tag signature file, to be fed to this command\(cqs standard input, has a very simple fixed format: four lines of
.sp
.if n \{\
.RS 4
.\}
.nf
object <hash>
type <typename>
tag <tagname>
tagger <tagger>
.fi
.if n \{\
.RE
.\}
.sp
followed by some \fIoptional\fR free\-form message (some tags created by older Git may not have a \fBtagger\fR line)\&. The message, when it exists, is separated by a blank line from the header\&. The message part may contain a signature that Git itself doesn\(cqt care about, but that can be verified with gpg\&.
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite