diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-03-09 14:19:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-09 14:19:31 -0800 |
commit | 7c37da749fa2c8d767b9ddfc2ed43986eb2f4d7c (patch) | |
tree | 217db038da87f53d7f6483aead1f09299d8a02e4 /git-cat-file.html | |
parent | c7a8d87b7ec3976798edbadec4c209e77b38c7c6 (diff) | |
download | git-htmldocs-7c37da749fa2c8d767b9ddfc2ed43986eb2f4d7c.tar.gz |
Autogenerated HTML docs for v2.35.1-455-g1a487
Diffstat (limited to 'git-cat-file.html')
-rw-r--r-- | git-cat-file.html | 66 |
1 files changed, 61 insertions, 5 deletions
diff --git a/git-cat-file.html b/git-cat-file.html index 516c38e34..bb1862ba6 100644 --- a/git-cat-file.html +++ b/git-cat-file.html @@ -902,6 +902,56 @@ whitespace, so that the appropriate drivers can be determined.</p></div> </p>
</dd>
<dt class="hdlist1">
+--batch-command
+</dt>
+<dt class="hdlist1">
+--batch-command=<format>
+</dt>
+<dd>
+<p>
+ Enter a command mode that reads commands and arguments from stdin. May
+ only be combined with <code>--buffer</code>, <code>--textconv</code> or <code>--filters</code>. In the
+ case of <code>--textconv</code> or <code>--filters</code>, the input lines also need to specify
+ the path, separated by whitespace. See the section <code>BATCH OUTPUT</code> below
+ for details.
+</p>
+<div class="paragraph"><p><code>--batch-command</code> recognizes the following commands:</p></div>
+<div class="openblock">
+<div class="content">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+contents <object>
+</dt>
+<dd>
+<p>
+ Print object contents for object reference <code><object></code>. This corresponds to
+ the output of <code>--batch</code>.
+</p>
+</dd>
+<dt class="hdlist1">
+info <object>
+</dt>
+<dd>
+<p>
+ Print object info for object reference <code><object></code>. This corresponds to the
+ output of <code>--batch-check</code>.
+</p>
+</dd>
+<dt class="hdlist1">
+flush
+</dt>
+<dd>
+<p>
+ Used with <code>--buffer</code> to execute all preceding commands that were issued
+ since the beginning or since the last flush was issued. When <code>--buffer</code>
+ is used, no output will come until a <code>flush</code> is issued. When <code>--buffer</code>
+ is not used, commands are flushed each time without issuing <code>flush</code>.
+</p>
+</dd>
+</dl></div>
+</div></div>
+</dd>
+<dt class="hdlist1">
--batch-all-objects
</dt>
<dd>
@@ -924,7 +974,7 @@ whitespace, so that the appropriate drivers can be determined.</p></div> that a process can interactively read and write from
<code>cat-file</code>. With this option, the output uses normal stdio
buffering; this is much more efficient when invoking
- <code>--batch-check</code> on a large number of objects.
+ <code>--batch-check</code> or <code>--batch-command</code> on a large number of objects.
</p>
</dd>
<dt class="hdlist1">
@@ -1038,6 +1088,12 @@ will be returned.</p></div> from stdin, one per line, and print information about them. By default,
the whole line is considered as an object, as if it were fed to
<a href="git-rev-parse.html">git-rev-parse(1)</a>.</p></div>
+<div class="paragraph"><p>When <code>--batch-command</code> is given, <code>cat-file</code> will read commands from stdin,
+one per line, and print information based on the command given. With
+<code>--batch-command</code>, the <code>info</code> command followed by an object will print
+information about the object the same way <code>--batch-check</code> would, and the
+<code>contents</code> command followed by an object prints contents in the same way
+<code>--batch</code> would.</p></div>
<div class="paragraph"><p>You can specify the information shown for each object by using a custom
<code><format></code>. The <code><format></code> is copied literally to stdout for each
object, with placeholders of the form <code>%(atom)</code> expanded, followed by a
@@ -1103,9 +1159,9 @@ newline. The available atoms are:</p></div> </dl></div>
<div class="paragraph"><p>If no format is specified, the default format is <code>%(objectname)
%(objecttype) %(objectsize)</code>.</p></div>
-<div class="paragraph"><p>If <code>--batch</code> is specified, the object information is followed by the
-object contents (consisting of <code>%(objectsize)</code> bytes), followed by a
-newline.</p></div>
+<div class="paragraph"><p>If <code>--batch</code> is specified, or if <code>--batch-command</code> is used with the <code>contents</code>
+command, the object information is followed by the object contents (consisting
+of <code>%(objectsize)</code> bytes), followed by a newline.</p></div>
<div class="paragraph"><p>For example, <code>--batch</code> without a custom format would produce:</p></div>
<div class="listingblock">
<div class="content">
@@ -1194,7 +1250,7 @@ will be reported.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2022-02-05 10:58:33 PST
+ 2022-03-09 14:17:38 PST
</div>
</div>
</body>
|