]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-mktag.txt
Merge branch 'mk/doc-gitfile-more' into maint-2.43
[thirdparty/git.git] / Documentation / git-mktag.txt
CommitLineData
2cf565c5
DG
1git-mktag(1)
2============
2cf565c5
DG
3
4NAME
5----
18430ed3 6git-mktag - Creates a tag object with extra validation
2cf565c5
DG
7
8
9SYNOPSIS
10--------
7791a1d9 11[verse]
33e8fc87 12'git mktag'
2cf565c5
DG
13
14DESCRIPTION
15-----------
c1bdacf9 16
dbe33c5a 17Reads a tag's contents on standard input and creates a tag object. The
18430ed3
ÆAB
18output is the new tag's <object> identifier.
19
20This command is mostly equivalent to linkgit:git-hash-object[1]
21invoked with `-t tag -w --stdin`. I.e. both of these will create and
22write a tag found in `my-tag`:
23
24 git mktag <my-tag
25 git hash-object -t tag -w --stdin <my-tag
26
27The difference is that mktag will die before writing the tag if the
acf9de4c
ÆAB
28tag doesn't pass a linkgit:git-fsck[1] check.
29
89363522 30The "fsck" check done by mktag is stricter than what linkgit:git-fsck[1]
acf9de4c
ÆAB
31would run by default in that all `fsck.<msg-id>` messages are promoted
32from warnings to errors (so e.g. a missing "tagger" line is an error).
33
34Extra headers in the object are also an error under mktag, but ignored
acfc0133 35by linkgit:git-fsck[1]. This extra check can be turned off by setting
548afb0d 36the appropriate `fsck.<msg-id>` variable:
acfc0133
ÆAB
37
38 git -c fsck.extraHeaderEntry=ignore mktag <my-tag-with-headers
c1bdacf9 39
414abf15
ÆAB
40OPTIONS
41-------
42
43--strict::
44 By default mktag turns on the equivalent of
45 linkgit:git-fsck[1] `--strict` mode. Use `--no-strict` to
46 disable it.
47
c1bdacf9
DG
48Tag Format
49----------
33e8fc87
JH
50A tag signature file, to be fed to this command's standard input,
51has a very simple fixed format: four lines of
c1bdacf9 52
f59b61dc 53 object <hash>
c1bdacf9
DG
54 type <typename>
55 tag <tagname>
6cfec036 56 tagger <tagger>
c1bdacf9 57
6cfec036 58followed by some 'optional' free-form message (some tags created
0a4f051f 59by older Git may not have a `tagger` line). The message, when it
6cfec036 60exists, is separated by a blank line from the header. The
2de9b711 61message part may contain a signature that Git itself doesn't
6cfec036 62care about, but that can be verified with gpg.
2cf565c5 63
2cf565c5
DG
64GIT
65---
9e1f0a85 66Part of the linkgit:git[1] suite