OSDN Git Service

merge original branch.
[tortoisegit/TortoiseGitJp.git] / doc / source / en / TortoiseGit / git_doc / git-patch-id.html.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-patch-id(1)">\r
5 <articleinfo>\r
6     <title>git-patch-id(1)</title>\r
7         <indexterm>\r
8                 <primary>git-patch-id(1)</primary>\r
9         </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-patch-id - Compute unique ID for a patch</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <simpara><emphasis>git patch-id</emphasis> &lt; &lt;patch&gt;</simpara>\r
18 </simplesect>\r
19 <simplesect id="_description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with\r
22 whitespace and line numbers ignored.  As such, it&#8217;s "reasonably stable", but at\r
23 the same time also reasonably unique, i.e., two patches that have the same "patch\r
24 ID" are almost guaranteed to be the same thing.</simpara>\r
25 <simpara>IOW, you can use this thing to look for likely duplicate commits.</simpara>\r
26 <simpara>When dealing with <emphasis>git-diff-tree</emphasis> output, it takes advantage of\r
27 the fact that the patch is prefixed with the object name of the\r
28 commit, and outputs two 40-byte hexadecimal string.  The first\r
29 string is the patch ID, and the second string is the commit ID.\r
30 This can be used to make a mapping from patch ID to commit ID.</simpara>\r
31 </simplesect>\r
32 <simplesect id="_options">\r
33 <title>OPTIONS</title>\r
34 <variablelist>\r
35 <varlistentry>\r
36 <term>\r
37 &lt;patch&gt;\r
38 </term>\r
39 <listitem>\r
40 <simpara>\r
41         The diff to create the ID of.\r
42 </simpara>\r
43 </listitem>\r
44 </varlistentry>\r
45 </variablelist>\r
46 </simplesect>\r
47 <simplesect id="_author">\r
48 <title>Author</title>\r
49 <simpara>Written by Linus Torvalds &lt;<ulink url="mailto:torvalds@osdl.org">torvalds@osdl.org</ulink>&gt;</simpara>\r
50 </simplesect>\r
51 <simplesect id="_documentation">\r
52 <title>Documentation</title>\r
53 <simpara>Documentation by Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>\r
54 </simplesect>\r
55 <simplesect id="_git">\r
56 <title>GIT</title>\r
57 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>\r
58 </simplesect>\r
59 </article>\r