summaryrefslogtreecommitdiffstats
path: root/git-name-rev.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-02-16 17:32:33 -0800
committerJunio C Hamano <gitster@pobox.com>2022-02-16 17:32:33 -0800
commitf1fc6ca2d27889be2f7829e15054bc8067ae9bc6 (patch)
tree3fb51df8e90ddd23c17c8a61a25df915ca6e7d73 /git-name-rev.txt
parent0170485c457d7e861874a761fb76ee8de1a79d89 (diff)
downloadgit-htmldocs-f1fc6ca2d27889be2f7829e15054bc8067ae9bc6.tar.gz
Autogenerated HTML docs for v2.35.1-193-g45fe28
Diffstat (limited to 'git-name-rev.txt')
-rw-r--r--git-name-rev.txt30
1 files changed, 28 insertions, 2 deletions
diff --git a/git-name-rev.txt b/git-name-rev.txt
index 5cb0eb085..ec8a27ce8 100644
--- a/git-name-rev.txt
+++ b/git-name-rev.txt
@@ -42,11 +42,37 @@ OPTIONS
--all::
List all commits reachable from all refs
---stdin::
+--annotate-stdin::
Transform stdin by substituting all the 40-character SHA-1
hexes (say $hex) with "$hex ($rev_name)". When used with
--name-only, substitute with "$rev_name", omitting $hex
- altogether. Intended for the scripter's use.
+ altogether.
++
+For example:
++
+-----------
+$ cat sample.txt
+
+An abbreviated revision 2ae0a9cb82 will not be substituted.
+The full name after substitution is 2ae0a9cb8298185a94e5998086f380a355dd8907,
+while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad
+
+$ git name-rev --annotate-stdin <sample.txt
+
+An abbreviated revision 2ae0a9cb82 will not be substituted.
+The full name after substitution is 2ae0a9cb8298185a94e5998086f380a355dd8907 (master),
+while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad
+
+$ git name-rev --name-only --annotate-stdin <sample.txt
+
+An abbreviated revision 2ae0a9cb82 will not be substituted.
+The full name after substitution is master,
+while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad
+-----------
+
+--stdin::
+ This option is deprecated in favor of 'git name-rev --annotate-stdin'.
+ They are functionally equivalent.
--name-only::
Instead of printing both the SHA-1 and the name, print only