]>
Commit | Line | Data |
---|---|---|
7672db20 BL |
1 | git-hash-object(1) |
2 | ================== | |
7672db20 BL |
3 | |
4 | NAME | |
5 | ---- | |
c3f0baac | 6 | git-hash-object - Compute object ID and optionally creates a blob from a file |
7672db20 BL |
7 | |
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
9ae8e008 | 11 | [verse] |
4a3d85dc | 12 | 'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>... |
a9f97909 | 13 | 'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths> |
7672db20 BL |
14 | |
15 | DESCRIPTION | |
16 | ----------- | |
17 | Computes the object ID value for an object with specified type | |
18 | with the contents of the named file (which can be outside of the | |
19 | work tree), and optionally writes the resulting object into the | |
20 | object database. Reports its object ID to its standard output. | |
0b444cdb | 21 | This is used by 'git cvsimport' to update the index |
7672db20 | 22 | without modifying files in the work tree. When <type> is not |
a6080a0a | 23 | specified, it defaults to "blob". |
7672db20 | 24 | |
2c6e4771 JS |
25 | OPTIONS |
26 | ------- | |
27 | ||
28 | -t <type>:: | |
29 | Specify the type (default: "blob"). | |
30 | ||
31 | -w:: | |
32 | Actually write the object into the object database. | |
7672db20 | 33 | |
024510c8 DB |
34 | --stdin:: |
35 | Read the object from standard input instead of from a file. | |
36 | ||
d8ee4832 AR |
37 | --stdin-paths:: |
38 | Read file names from stdin instead of from the command-line. | |
39 | ||
39702431 DP |
40 | --path:: |
41 | Hash object as it were located at the given path. The location of | |
42 | file does not directly influence on the hash value, but path is | |
43 | used to determine what git filters should be applied to the object | |
44 | before it can be placed to the object database, and, as result of | |
45 | applying filters, the actual blob put into the object database may | |
46 | differ from the given file. This option is mainly useful for hashing | |
47 | temporary files located outside of the working directory or files | |
48 | read from stdin. | |
49 | ||
4a3d85dc DP |
50 | --no-filters:: |
51 | Hash the contents as is, ignoring any input filter that would | |
52 | have been chosen by the attributes mechanism, including crlf | |
53 | conversion. If the file is read from standard input then this | |
54 | is always implied, unless the --path option is given. | |
55 | ||
7672db20 BL |
56 | Author |
57 | ------ | |
59eb68aa | 58 | Written by Junio C Hamano <gitster@pobox.com> |
7672db20 BL |
59 | |
60 | Documentation | |
61 | -------------- | |
62 | Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. | |
63 | ||
64 | GIT | |
65 | --- | |
9e1f0a85 | 66 | Part of the linkgit:git[1] suite |