Update git documentation
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-hash-object.xml
blob8ffe5e9136d88fdffe77a540b0f8db4985aa8fd1
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <sect2 lang="en" id="git-hash-object(1)">\r
5     <title>git-hash-object(1)</title>\r
6 <indexterm>\r
7 <primary>git-hash-object(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-hash-object(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-hash-object - Compute object ID and optionally creates a blob from a file</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-hash-object(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <blockquote>\r
16 <literallayout><emphasis>git hash-object</emphasis> [-t &lt;type&gt;] [-w] [--path=&lt;file&gt;|--no-filters] [--stdin [--literally]] [--] &lt;file&gt;&#8230;\r
17 <emphasis>git hash-object</emphasis> [-t &lt;type&gt;] [-w] --stdin-paths [--no-filters]</literallayout>\r
18 </blockquote>\r
19 </simplesect>\r
20 <simplesect id="git-hash-object(1)__description">\r
21 <title>DESCRIPTION</title>\r
22 <simpara>Computes the object ID value for an object with specified type\r
23 with the contents of the named file (which can be outside of the\r
24 work tree), and optionally writes the resulting object into the\r
25 object database.  Reports its object ID to its standard output.\r
26 This is used by <emphasis>git cvsimport</emphasis> to update the index\r
27 without modifying files in the work tree.  When &lt;type&gt; is not\r
28 specified, it defaults to "blob".</simpara>\r
29 </simplesect>\r
30 <simplesect id="git-hash-object(1)__options">\r
31 <title>OPTIONS</title>\r
32 <variablelist>\r
33 <varlistentry>\r
34 <term>\r
35 -t &lt;type&gt;\r
36 </term>\r
37 <listitem>\r
38 <simpara>\r
39         Specify the type (default: "blob").\r
40 </simpara>\r
41 </listitem>\r
42 </varlistentry>\r
43 <varlistentry>\r
44 <term>\r
45 -w\r
46 </term>\r
47 <listitem>\r
48 <simpara>\r
49         Actually write the object into the object database.\r
50 </simpara>\r
51 </listitem>\r
52 </varlistentry>\r
53 <varlistentry>\r
54 <term>\r
55 --stdin\r
56 </term>\r
57 <listitem>\r
58 <simpara>\r
59         Read the object from standard input instead of from a file.\r
60 </simpara>\r
61 </listitem>\r
62 </varlistentry>\r
63 <varlistentry>\r
64 <term>\r
65 --stdin-paths\r
66 </term>\r
67 <listitem>\r
68 <simpara>\r
69         Read file names from the standard input, one per line, instead\r
70         of from the command-line.\r
71 </simpara>\r
72 </listitem>\r
73 </varlistentry>\r
74 <varlistentry>\r
75 <term>\r
76 --path\r
77 </term>\r
78 <listitem>\r
79 <simpara>\r
80         Hash object as it were located at the given path. The location of\r
81         file does not directly influence on the hash value, but path is\r
82         used to determine what Git filters should be applied to the object\r
83         before it can be placed to the object database, and, as result of\r
84         applying filters, the actual blob put into the object database may\r
85         differ from the given file. This option is mainly useful for hashing\r
86         temporary files located outside of the working directory or files\r
87         read from stdin.\r
88 </simpara>\r
89 </listitem>\r
90 </varlistentry>\r
91 <varlistentry>\r
92 <term>\r
93 --no-filters\r
94 </term>\r
95 <listitem>\r
96 <simpara>\r
97         Hash the contents as is, ignoring any input filter that would\r
98         have been chosen by the attributes mechanism, including the end-of-line\r
99         conversion. If the file is read from standard input then this\r
100         is always implied, unless the <emphasis>--path</emphasis> option is given.\r
101 </simpara>\r
102 </listitem>\r
103 </varlistentry>\r
104 <varlistentry>\r
105 <term>\r
106 --literally\r
107 </term>\r
108 <listitem>\r
109 <simpara>\r
110         Allow <emphasis>--stdin</emphasis> to hash any garbage into a loose object which might not\r
111         otherwise pass standard object parsing or git-fsck checks. Useful for\r
112         stress-testing Git itself or reproducing characteristics of corrupt or\r
113         bogus objects encountered in the wild.\r
114 </simpara>\r
115 </listitem>\r
116 </varlistentry>\r
117 </variablelist>\r
118 </simplesect>\r
119 <simplesect id="git-hash-object(1)__git">\r
120 <title>GIT</title>\r
121 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
122 </simplesect>\r
123 </sect2>\r