From 9ae8e008abf2e05dee59142fae068ae1f9004147 Mon Sep 17 00:00:00 2001 From: Dmitry Potapov Date: Sun, 3 Aug 2008 18:36:19 +0400 Subject: correct usage help string for git-hash-object The usage string is corrected to make it fit in 80 columns and to make it unequivocal about what options can be used with --stdin-paths. Signed-off-by: Dmitry Potapov Signed-off-by: Junio C Hamano --- Documentation/git-hash-object.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt index ac928e198e..a4703ec0de 100644 --- a/Documentation/git-hash-object.txt +++ b/Documentation/git-hash-object.txt @@ -8,7 +8,9 @@ git-hash-object - Compute object ID and optionally creates a blob from a file SYNOPSIS -------- -'git hash-object' [-t ] [-w] [--stdin | --stdin-paths] [--] ... +[verse] +'git hash-object' [-t ] [-w] [--stdin] [--] ... +'git hash-object' [-t ] [-w] --stdin-paths < DESCRIPTION ----------- -- cgit v1.2.1 From 39702431500b76425f047209c9e9b2aae7e92b00 Mon Sep 17 00:00:00 2001 From: Dmitry Potapov Date: Sun, 3 Aug 2008 18:36:21 +0400 Subject: add --path option to git hash-object The --path option allows us to pretend as if the contents being hashed came from the specified path, and affects which input filter is used via the attributes mechanism. This is useful for hashing a temporary file whose name is different from the path that is meant to have the hashed contents. Signed-off-by: Dmitry Potapov Signed-off-by: Junio C Hamano --- Documentation/git-hash-object.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt index a4703ec0de..fececbf753 100644 --- a/Documentation/git-hash-object.txt +++ b/Documentation/git-hash-object.txt @@ -9,7 +9,7 @@ git-hash-object - Compute object ID and optionally creates a blob from a file SYNOPSIS -------- [verse] -'git hash-object' [-t ] [-w] [--stdin] [--] ... +'git hash-object' [-t ] [-w] [--path=] [--stdin] [--] ... 'git hash-object' [-t ] [-w] --stdin-paths < DESCRIPTION @@ -37,6 +37,16 @@ OPTIONS --stdin-paths:: Read file names from stdin instead of from the command-line. +--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. + Author ------ Written by Junio C Hamano -- cgit v1.2.1 From 4a3d85dcf6722b7e5d16b5b1f69b51e39ad5f1dc Mon Sep 17 00:00:00 2001 From: Dmitry Potapov Date: Sun, 3 Aug 2008 18:36:22 +0400 Subject: add --no-filters option to git hash-object The new option allows the contents to be hashed as is, ignoring any input filter that would have been chosen by the attributes mechanism. This option is incompatible with --path and --stdin-paths options. Signed-off-by: Dmitry Potapov Signed-off-by: Junio C Hamano --- Documentation/git-hash-object.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt index fececbf753..0af40cfb85 100644 --- a/Documentation/git-hash-object.txt +++ b/Documentation/git-hash-object.txt @@ -9,7 +9,7 @@ git-hash-object - Compute object ID and optionally creates a blob from a file SYNOPSIS -------- [verse] -'git hash-object' [-t ] [-w] [--path=] [--stdin] [--] ... +'git hash-object' [-t ] [-w] [--path=|--no-filters] [--stdin] [--] ... 'git hash-object' [-t ] [-w] --stdin-paths < DESCRIPTION @@ -47,6 +47,12 @@ OPTIONS temporary files located outside of the working directory or files read from stdin. +--no-filters:: + Hash the contents as is, ignoring any input filter that would + have been chosen by the attributes mechanism, including crlf + conversion. If the file is read from standard input then this + is always implied, unless the --path option is given. + Author ------ Written by Junio C Hamano -- cgit v1.2.1