git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "ahmed akef via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: ahmed akef <aemed.akef.1@gmail.com>, ahmed akef <aemed.akef.1@gmail.com>
Subject: [PATCH v3] docs: explain the order of output in the batched mode of git-cat-file(1)
Date: Thu, 22 Aug 2024 19:50:31 +0000	[thread overview]
Message-ID: <pull.1768.v3.git.git.1724356231639.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1768.v2.git.git.1724234729288.gitgitgadget@gmail.com>

From: ahmed akef <aemed.akef.1@gmail.com>

The batched mode of git-cat-file(1) reads multiple objects from stdin
and prints their respective contents to stdout.
The order in which those objects are printed is not documented
and may not be immediately obvious to the user.
Document it.

Signed-off-by: ahmed akef <aemed.akef.1@gmail.com>
---
    docs: explain the order of output in The batched mode of git-cat-file(1)
    
    this is the same change as https://github.com/git/git/pull/1761 but due
    to missteps, the PR got closed and I couldn't fix it, also applied the
    review comments from @pks-t
    cc: Patrick Steinhardt ps@pks.im

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1768%2Fahmedakef%2Fexplain-the-order-of-output-in-cat-file-batch-operations-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1768/ahmedakef/explain-the-order-of-output-in-cat-file-batch-operations-v3
Pull-Request: https://github.com/git/git/pull/1768

Range-diff vs v2:

 1:  3f742957aa1 ! 1:  6adeb2c7bb3 docs: explain the order of output in the batched mode of git-cat-file(1)
     @@ Documentation/git-cat-file.txt: BATCH OUTPUT
      -the whole line is considered as an object, as if it were fed to
      -linkgit:git-rev-parse[1].
      +from stdin, one per line, and print information about them in the same
     -+order as they have been read from stdin. By default, the whole line is
     ++order as they have been read. By default, the whole line is
      +considered as an object, as if it were fed to linkgit:git-rev-parse[1].
       
       When `--batch-command` is given, `cat-file` will read commands from stdin,


 Documentation/git-cat-file.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
index bd95a6c10a7..d5890ae3686 100644
--- a/Documentation/git-cat-file.txt
+++ b/Documentation/git-cat-file.txt
@@ -270,9 +270,9 @@ BATCH OUTPUT
 ------------
 
 If `--batch` or `--batch-check` is given, `cat-file` will read objects
-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
-linkgit:git-rev-parse[1].
+from stdin, one per line, and print information about them in the same
+order as they have been read. By default, the whole line is
+considered as an object, as if it were fed to linkgit:git-rev-parse[1].
 
 When `--batch-command` is given, `cat-file` will read commands from stdin,
 one per line, and print information based on the command given. With

base-commit: 80ccd8a2602820fdf896a8e8894305225f86f61d
-- 
gitgitgadget

      parent reply	other threads:[~2024-08-22 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21  9:28 [PATCH] docs: explain the order of output in the batched mode of git-cat-file(1) ahmed akef via GitGitGadget
2024-08-21 10:05 ` [PATCH v2] " ahmed akef via GitGitGadget
2024-08-21 17:19   ` Junio C Hamano
     [not found]     ` <CAH64z8+dScuQbvu1aHnodE7VpCvgU2djbJhQDff76iyeFtpdTw@mail.gmail.com>
     [not found]       ` <CAH64z8KUWSNii_U5k5fAz3q9cu34+pOWk2Rmw-60x7iOKOD8gQ@mail.gmail.com>
2024-08-22  7:31         ` Ahmed Akef
2024-08-22 15:07           ` Junio C Hamano
2024-08-22 19:50   ` ahmed akef via GitGitGadget [this message]

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=pull.1768.v3.git.git.1724356231639.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=aemed.akef.1@gmail.com \
    --cc=git@vger.kernel.org \
    /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).