git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Henry <git@drmikehenry.com>, git@vger.kernel.org
Subject: [PATCH 2/5] bundle: document handling of "-" as stdin
Date: Sat, 4 Mar 2023 05:26:40 -0500	[thread overview]
Message-ID: <ZAMc4DPOSjqxY/UT@coredump.intra.peff.net> (raw)
In-Reply-To: <ZAMb8LSpm2gOrpeY@coredump.intra.peff.net>

We have always allowed "bundle create -" to write to stdout, but it was
never documented. And a recent patch let reading operations like "bundle
list-heads -" read from stdin.

Let's document all of these cases.

Signed-off-by: Jeff King <peff@peff.net>
---
Arguably could be squashed into the previous patch, but the bit for
"create" is weird then.

 Documentation/git-bundle.txt | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index 18a022b4b40..d19f4cf2b3c 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -66,7 +66,7 @@ create [options] <file> <git-rev-list-args>::
 	Used to create a bundle named 'file'.  This requires the
 	'<git-rev-list-args>' arguments to define the bundle contents.
 	'options' contains the options specific to the 'git bundle create'
-	subcommand.
+	subcommand. If 'file' is `-`, the bundle is written to stdout.
 
 verify <file>::
 	Used to check that a bundle file is valid and will apply
@@ -77,19 +77,21 @@ verify <file>::
 	Finally, information about additional capabilities, such as "object
 	filter", is printed. See "Capabilities" in linkgit:gitformat-bundle[5]
 	for more information. The exit code is zero for success, but will
-	be nonzero if the bundle file is invalid.
+	be nonzero if the bundle file is invalid. If 'file' is `-`, the
+	bundle is read from stdin.
 
 list-heads <file>::
 	Lists the references defined in the bundle.  If followed by a
 	list of references, only references matching those given are
-	printed out.
+	printed out. If 'file' is `-`, the bundle is read from stdin.
 
 unbundle <file>::
 	Passes the objects in the bundle to 'git index-pack'
 	for storage in the repository, then prints the names of all
 	defined references. If a list of references is given, only
 	references matching those in the list are printed. This command is
 	really plumbing, intended to be called only by 'git fetch'.
+	If 'file' is `-`, the bundle is read from stdin.
 
 <git-rev-list-args>::
 	A list of arguments, acceptable to 'git rev-parse' and
-- 
2.40.0.rc1.500.g967c04631e


  parent reply	other threads:[~2023-03-04 10:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-25 12:58 `git bundle create -` may not write to `stdout` Michael Henry
2023-02-26 23:16 ` Jeff King
2023-03-03 22:31   ` Junio C Hamano
2023-03-03 22:54     ` Jeff King
2023-03-03 23:05       ` Junio C Hamano
2023-03-04  1:28         ` Jeff King
2023-03-04  1:46           ` Jeff King
2023-03-04 10:22             ` [PATCH 0/5] handling "-" as stdin/stdout in git bundle Jeff King
2023-03-04 10:26               ` [PATCH 1/5] bundle: let "-" mean stdin for reading operations Jeff King
2023-03-04 10:26               ` Jeff King [this message]
2023-03-04 10:27               ` [PATCH 3/5] bundle: don't blindly apply prefix_filename() to "-" Jeff King
2023-03-04 10:31               ` [PATCH 4/5] parse-options: consistently allocate memory in fix_filename() Jeff King
2023-03-04 10:31               ` [PATCH 5/5] parse-options: use prefix_filename_except_for_dash() helper Jeff King
2023-03-04 10:55               ` [RFC/PATCH] bundle: turn on --all-progress-implied by default Jeff King
2023-03-06  3:44                 ` Robin H. Johnson
2023-03-06  5:38                   ` Jeff King
2023-03-06  9:25                     ` Jeff King
2023-03-06 17:41                 ` Junio C Hamano
2023-03-06 17:34             ` `git bundle create -` may not write to `stdout` Junio C Hamano
2023-03-04  1:14       ` Junio C Hamano
2023-03-04  1:43         ` Jeff King
2023-03-03 23:59     ` Michael Henry
2023-03-04  2:22       ` Jeff King
2023-03-04 10:08         ` Michael Henry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZAMc4DPOSjqxY/UT@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@drmikehenry.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).