Skip to content

Commit 18430ed

Browse files
avargitster
authored andcommitted
mktag doc: update to explain why to use this
Change the mktag documentation to compare itself to the similar "hash-object -t tag" command. Before this someone reading the documentation wouldn't have much of an idea what the difference was. Let's allude to our own validation logic, and cross-link the "mktag" and "hash-object" documentation to aid discover-ability. A follow-up change to migrate "mktag" to use "fsck" validation will make the part about validation logic clearer. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9ce0fc3 commit 18430ed

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Documentation/git-mktag.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git-mktag(1)
33

44
NAME
55
----
6-
git-mktag - Creates a tag object
6+
git-mktag - Creates a tag object with extra validation
77

88

99
SYNOPSIS
@@ -13,10 +13,19 @@ SYNOPSIS
1313

1414
DESCRIPTION
1515
-----------
16-
Reads a tag contents on standard input and creates a tag object
17-
that can also be used to sign other objects.
1816

19-
The output is the new tag's <object> identifier.
17+
Reads a tag contents on standard input and creates a tag object. The
18+
output is the new tag's <object> identifier.
19+
20+
This command is mostly equivalent to linkgit:git-hash-object[1]
21+
invoked with `-t tag -w --stdin`. I.e. both of these will create and
22+
write a tag found in `my-tag`:
23+
24+
git mktag <my-tag
25+
git hash-object -t tag -w --stdin <my-tag
26+
27+
The difference is that mktag will die before writing the tag if the
28+
tag doesn't pass a sanity check.
2029

2130
Tag Format
2231
----------

0 commit comments

Comments
 (0)