use parse_options() in git hash-object
[git/gitweb.git] / Documentation / git-hash-object.txt
bloba4703ec0defe4686780184354120e666b79f26f6
1 git-hash-object(1)
2 ==================
4 NAME
5 ----
6 git-hash-object - Compute object ID and optionally creates a blob from a file
9 SYNOPSIS
10 --------
11 [verse]
12 'git hash-object' [-t <type>] [-w] [--stdin] [--] <file>...
13 'git hash-object' [-t <type>] [-w] --stdin-paths < <list-of-paths>
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.
21 This is used by 'git-cvsimport' to update the index
22 without modifying files in the work tree.  When <type> is not
23 specified, it defaults to "blob".
25 OPTIONS
26 -------
28 -t <type>::
29         Specify the type (default: "blob").
31 -w::
32         Actually write the object into the object database.
34 --stdin::
35         Read the object from standard input instead of from a file.
37 --stdin-paths::
38         Read file names from stdin instead of from the command-line.
40 Author
41 ------
42 Written by Junio C Hamano <gitster@pobox.com>
44 Documentation
45 --------------
46 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
48 GIT
49 ---
50 Part of the linkgit:git[1] suite