git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] doc/cat-file: allow --use-mailmap for --batch options

From
Siddharth Asthana <siddharthasthana31@gmail.com>
Date
Sep 23, 2022, 19:35 UTC
Message-ID
<20220923193543.58635-1-siddharthasthana31@gmail.com>

The command git cat-file can now use the mailmap mechanism to replace idents with their canonical versions for commit and tag objects. There are several options like `--batch`, `--batch-check` and `--batch-command` that can be combined with `--use-mailmap`. But, the documentation for `--batch`, `--batch-check` and `--batch-command` doesn't say so. This patch fixes that documentation.

Mentored-by: Christian Couder's avatarChristian Couder <christian.couder@gmail.com>
Mentored-by: John Cai's avatarJohn Cai <johncai86@gmail.com>
Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com>
---
 Documentation/git-cat-file.txt | 44 ++++++++++++++++++++++++----------
 1 file changed, 31 insertions(+), 13 deletions(-)
diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
index ec30b5c574..3fdafc07ce 100644
--- a/Documentation/git-cat-file.txt
+++ b/Documentation/git-cat-file.txt
@@ -89,26 +89,44 @@ OPTIONS
 --batch::
 --batch=<format>::
 	Print object information and contents for each object provided
-	on stdin.  May not be combined with any other options or arguments
-	except `--textconv` or `--filters`, in which case the input lines
-	also need to specify the path, separated by whitespace.  See the
-	section `BATCH OUTPUT` below for details.
+	on stdin.
+
+	* When used with `--textconv` or `--filters`, the input lines
+	  must specify the path, separated by whitespace. See the section
+	  `BATCH OUTPUT` below for details.
+
+	* When used with `--use-mailmap`, the info command shows the size
+	  the object, if the idents recorded in it were the ones "corrected"
+	  by the mailmap mechanism.
+	  Cannot be used with any other options.
 
 --batch-check::
 --batch-check=<format>::
-	Print object information for each object provided on stdin.  May
-	not be combined with any other options or arguments except
-	`--textconv` or `--filters`, in which case the input lines also
-	need to specify the path, separated by whitespace.  See the
-	section `BATCH OUTPUT` below for details.
+	Print object information for each object provided on stdin.
+
+	* When used with `--textconv` or `--filters`, the input lines must
+	 specify the path, separated by whitespace. See the section
+	 `BATCH OUTPUT` below for details.
+
+	* When used with `--use-mailmap`, the info command shows the size
+	  the object, if the idents recorded in it were the ones "corrected"
+	  by the mailmap mechanism.
+	  Cannot be used with any other options.
 
 --batch-command::
 --batch-command=<format>::
 	Enter a command mode that reads commands and arguments from stdin. May
-	only be combined with `--buffer`, `--textconv` or `--filters`. In the
-	case of `--textconv` or `--filters`, the input lines also need to specify
-	the path, separated by whitespace. See the section `BATCH OUTPUT` below
-	for details.
+	only be combined with `--buffer`, `--textconv`, `--use-mailmap` or
+	`--filters`.
+
+	* When used with `--textconv` or `--filters`, the input lines must
+	  specify the path, separated by whitespace. See the section
+	  `BATCH OUTPUT` below for details.
+
+	* When used with `--use-mailmap`, the info command shows the size the
+	  object, if the idents recorded in it were the ones "corrected" by the
+	  mailmap mechanism.
+
 +
 `--batch-command` recognizes the following commands:
 +
-- 
2.38.0.rc1.3.g2cb248e00d.dirty
Next: Christian Couder
Message 1 of 13 in “doc/cat-file: allow --use-mailmap for --batch options”
  1. doc/cat-file: allow --use-mailmap for --batch optionsSiddharth Asthana, Sep 23, 2022
  2. Christian CouderSep 24, 2022
  3. doc/cat-file: allow --use-mailmap for --batch optionsSiddharth Asthana, Sep 26, 2022
  4. John CaiSep 26, 2022
  5. Siddharth AsthanaOct 21, 2022
  6. doc/cat-file: allow --use-mailmap for --batch optionsSiddharth Asthana, Oct 21, 2022
  7. Junio C HamanoOct 21, 2022
  8. doc/cat-file: allow --use-mailmap for --batch optionsSiddharth Asthana, Oct 29, 2022
  9. Taylor BlauOct 29, 2022
  10. Christian CouderOct 30, 2022
  11. Taylor BlauOct 30, 2022
  12. Christian CouderOct 31, 2022
  13. Siddharth AsthanaNov 13, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.