blob: 0af40cfb85ca6e0eb6e540f0beb47e449ef25afd [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-hash-object(1)
2==================
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-hash-object - Compute object ID and optionally creates a blob from a file
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano5cf43ca2008-08-20 09:14:1411[verse]
12'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>...
13'git hash-object' [-t <type>] [-w] --stdin-paths < <list-of-paths>
Junio C Hamano1a4e8412005-12-27 08:17:2314
15DESCRIPTION
16-----------
17Computes the object ID value for an object with specified type
18with the contents of the named file (which can be outside of the
19work tree), and optionally writes the resulting object into the
20object database. Reports its object ID to its standard output.
Junio C Hamanoba4b9282008-07-06 05:20:3121This is used by 'git-cvsimport' to update the index
Junio C Hamano1a4e8412005-12-27 08:17:2322without modifying files in the work tree. When <type> is not
Junio C Hamanoa77a5132007-06-08 16:13:4423specified, it defaults to "blob".
Junio C Hamano1a4e8412005-12-27 08:17:2324
25OPTIONS
26-------
27
28-t <type>::
29Specify the type (default: "blob").
30
31-w::
32Actually write the object into the object database.
33
34--stdin::
35Read the object from standard input instead of from a file.
36
Junio C Hamanodfccbb02008-05-26 01:16:1437--stdin-paths::
38Read file names from stdin instead of from the command-line.
39
Junio C Hamano5cf43ca2008-08-20 09:14:1440--path::
41Hash object as it were located at the given path. The location of
42file does not directly influence on the hash value, but path is
43used to determine what git filters should be applied to the object
44before it can be placed to the object database, and, as result of
45applying filters, the actual blob put into the object database may
46differ from the given file. This option is mainly useful for hashing
47temporary files located outside of the working directory or files
48read from stdin.
49
50--no-filters::
51Hash the contents as is, ignoring any input filter that would
52have been chosen by the attributes mechanism, including crlf
53conversion. If the file is read from standard input then this
54is always implied, unless the --path option is given.
55
Junio C Hamano1a4e8412005-12-27 08:17:2356Author
57------
Junio C Hamano0868a302008-07-22 09:20:4458Written by Junio C Hamano <gitster@pobox.com>
Junio C Hamano1a4e8412005-12-27 08:17:2359
60Documentation
61--------------
62Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
63
64GIT
65---
Junio C Hamanof7c042d2008-06-06 22:50:5366Part of the linkgit:git[1] suite