hash-object

NAME

git-hash-object - Compute object ID and optionally creates a blob from a filegit-hash-object - オブジェクトIDを計算し、オプションでファイルからBLOBを作成する

SYNOPSIS概要

git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>…​
git hash-object [-t <type>] [-w] --stdin-paths [--no-filters]

DESCRIPTION説明

Computes the object ID value for an object with specified type with the contents of the named file (which can be outside of the work tree), and optionally writes the resulting object into the object database. Reports its object ID to its standard output. This is used by git cvsimport to update the index without modifying files in the work tree. When <type> is not specified, it defaults to "blob".指定されたファイルの内容(ワークツリーの外側にある場合もあります)を使用して、指定されたタイプのオブジェクトのオブジェクトID値を計算し、必要に応じて結果のオブジェクトをオブジェクトデータベースに書き込みます。そのオブジェクトIDを標準出力に報告します。これは、作業ツリーのファイルを修正せずにインデックスを更新するためにgit cvsimportによって使用されます。<type>が指定されていない場合は、デフォルトの "blob"になります。

OPTIONSオプション

-t <type> -t <タイプ>

Specify the type (default: "blob").タイプを指定してください(デフォルト: "blob")。

-w

Actually write the object into the object database.実際にオブジェクトをオブジェクトデータベースに書き込みます。

--stdin

Read the object from standard input instead of from a file.ファイルからではなく標準入力からオブジェクトを読み取ります。

--stdin-paths

Read file names from the standard input, one per line, instead of from the command-line.コマンドラインからではなく、標準入力から1行に1つずつファイル名を読み取ります。

--path - パス

Hash object as it were located at the given path. The location of file does not directly influence on the hash value, but path is used to determine what Git filters should be applied to the object before it can be placed to the object database, and, as result of applying filters, the actual blob put into the object database may differ from the given file. This option is mainly useful for hashing temporary files located outside of the working directory or files read from stdin.指定されたパスに配置されたままのハッシュオブジェクト。ファイルの場所はハッシュ値には直接影響しませんが、pathを使用してオブジェクトデータベースに配置する前にどのGitフィルタをオブジェクトに適用するかを決定します。フィルタを適用した結果、実際のBLOBは次のようになります。オブジェクトデータベースへの入力は、指定されたファイルと異なる場合があります。このオプションは主に作業ディレクトリの外側にある一時ファイルや標準入力から読み込まれたファイルをハッシュするのに役立ちます。

--no-filters

Hash the contents as is, ignoring any input filter that would have been chosen by the attributes mechanism, including the end-of-line conversion. If the file is read from standard input then this is always implied, unless the --path option is given.内容をそのままハッシュ化し、行末変換を含む属性メカニズムによって選択されたであろう入力フィルタを無視します。ファイルが標準入力から読み込まれる場合、--pathオプションが与えられていない限り、これは常に暗黙のうちに含まれます。

--literally - 文字通り

Allow --stdin to hash any garbage into a loose object which might not otherwise pass standard object parsing or git-fsck checks. Useful for stress-testing Git itself or reproducing characteristics of corrupt or bogus objects encountered in the wild.--stdin標準的なオブジェクトの構文解析やgit-fsckのチェックに合格しないようなゴミを緩いオブジェクトにハッシュすることを許可します。Git自体をストレステストしたり、野外で遭遇した不正なオブジェクトや偽のオブジェクトの特性を再現するのに便利です。

GIT

Part of the git[1] suite一部のgit [1]スイート

関連記事

スポンサーリンク

テキストを可逆的な暗号化する Crypt_Blowfish

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る