Skip to contentSkip to conversation

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

PATCH In review Siddharth Asthana 5 participants 13 messages Sep 23, 2022 – Nov 13, 2022 Documentation

lore
Share & tools
lore
#0 lore raw

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

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.

---
 Documentation/git-cat-file.txt | 44 ++++++++++++++++++++++++----------
 1 file changed, 31 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +31 -13
index ec30b5c574..3fdafc07ce 100644
@@ -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:
 +
Signature · 1 line
2.38.0.rc1.3.g2cb248e00d.dirty
#1 lore raw
Quoted 10 lines · Siddharth Asthana

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.

As you told me separately, you should remove "Christian Couder's avatar" and "John Cai's avatar" from the above trailers.

Quoted 2 lines

---

Here after the line that contains only '---' and before the short stats below, you could write some small explanations about where this patch comes from.

For example you could say that it was previously sent as the first patch of a a 3 patch series:

https://lore.kernel.org/git/[email protected]/

And you could tell what changes you made compared to the previous patch.

Quoted 15 lines
 Documentation/git-cat-file.txt | 44 ++++++++++++++++++++++++----------
 1 file changed, 31 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +0 -4
index ec30b5c574..3fdafc07ce 100644
@@ -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.

Documentation/git-cat-file.txt OPTIONS · line 101

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+       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.

Have you checked the result of git help cat-file after make instll-doc?

Shouldn't you use something like the following instead for additional paragraphs inside some indented text:

+
* When used with --textconv or --filters, the input lines must specify the path, separated by whitespace. See the section BATCH OUTPUT below for details.
+

?

(Note that the + signs in what I suggest above should be actually added to the file and aren't what a diff displays in front of new lines.)

Also it's not very clear if "Cannot be used with any other options." is part of the last "* When ..." paragraph or not.

#2 lore raw

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

In reply to Siddharth Asthana

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.

---

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

Changes in v2:
- Fixed the names in trailers in the commit message
- Updated the documentation to clearly state that the --batch-check, --batch-command and --batch options can only be used with --textconv, --filters or --use-mailmap.
- Fixed formating

 Documentation/git-cat-file.txt | 45 ++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +32 -13
index ec30b5c574..2a8f050a29 100644
@@ -89,26 +89,45 @@ 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. May not be combined with any other options or arguments
+	except --textconv, --filters or --use-mailmap.
+	+
+	* 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-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. May not be
+	combined with any other options or arguments except --textconv, --filters
+	or --use-mailmap.
+	+
+	* 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::
 --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:
 +
Signature · 1 line
2.38.0.rc1.4.g29ac4cf309.dirty
#3 lore raw

Hi Siddarth,

Quoted 31 lines · Siddharth Asthana

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.

---

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

Changes in v2:
- Fixed the names in trailers in the commit message
- Updated the documentation to clearly state that the --batch-check, --batch-command and --batch options can only be used with --textconv, --filters or --use-mailmap.
- Fixed formating

 Documentation/git-cat-file.txt | 45 ++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +0 -0
index ec30b5c574..2a8f050a29 100644

Documentation/git-cat-file.txt OPTIONS · line 93

Quoted 9 lines
Documentation/git-cat-file.txt +2 -4
@@ -89,26 +89,45 @@ 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. May not be combined with any other options or arguments
+	except --textconv, --filters or --use-mailmap.

except --textconv, --filters, or --use-mailmap.

Documentation/git-cat-file.txt OPTIONS · line 101

Quoted 8 lines
Documentation/git-cat-file.txt +8 -0
+	+
+	* 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.

When used with --use-mailmap, the info command shows the size the object if the identities recorded in it were replaced by the mailmap mechanism.

Quoted 9 lines
Documentation/git-cat-file.txt +1 -5
 --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. May not be

Documentation/git-cat-file.txt OPTIONS · line 115

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+	combined with any other options or arguments except --textconv, --filters
+	or --use-mailmap.
+	+
+	* 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.

Same as above

Quoted 7 lines
Documentation/git-cat-file.txt +0 -4
 --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.

Documentation/git-cat-file.txt OPTIONS · line 129

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+	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.

Same as above

Quoted 6 lines
Documentation/git-cat-file.txt +1 -0
+
 +
 `--batch-command` recognizes the following commands:
 +
Signature · 1 line
2.38.0.rc1.4.g29ac4cf309.dirty

thanks!

#4 lore raw
Quoted 102 lines · John Cai

Hi Siddarth,

Quoted 31 lines · Siddharth Asthana

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.

---

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

Changes in v2:
- Fixed the names in trailers in the commit message
- Updated the documentation to clearly state that the --batch-check, --batch-command and --batch options can only be used with --textconv, --filters or --use-mailmap.
- Fixed formating

  Documentation/git-cat-file.txt | 45 ++++++++++++++++++++++++----------
  1 file changed, 32 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +0 -0
index ec30b5c574..2a8f050a29 100644

Documentation/git-cat-file.txt OPTIONS · line 93

Quoted 9 lines
Documentation/git-cat-file.txt +2 -4
@@ -89,26 +89,45 @@ 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. May not be combined with any other options or arguments
+	except --textconv, --filters or --use-mailmap.

except --textconv, --filters, or --use-mailmap.

Documentation/git-cat-file.txt OPTIONS · line 101

Quoted 8 lines
Documentation/git-cat-file.txt +8 -0
+	+
+	* 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.

When used with --use-mailmap, the info command shows the size the object if the identities recorded in it were replaced by the mailmap mechanism.

Quoted 9 lines
Documentation/git-cat-file.txt +1 -5
  --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. May not be

Documentation/git-cat-file.txt OPTIONS · line 115

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+	combined with any other options or arguments except --textconv, --filters
+	or --use-mailmap.
+	+
+	* 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.

Same as above

Quoted 7 lines
Documentation/git-cat-file.txt +0 -4
  --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.

Documentation/git-cat-file.txt OPTIONS · line 129

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+	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.

Same as above

Quoted 8 lines
Quoted 6 lines
Documentation/git-cat-file.txt +1 -0
+
  +
  `--batch-command` recognizes the following commands:
  +
Signature · 1 line
2.38.0.rc1.4.g29ac4cf309.dirty

thanks!

Thanks a lot for the review John! Will make the suggested changes and send the v3 patch.

#5 lore raw

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

In reply to Siddharth Asthana

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.

---

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

Changes in v2:
- Fixed the names in trailers in the commit message
- Updated the documentation to clearly state that the --batch-check, --batch-command and --batch options can only be used with --textconv, --filters or --use-mailmap.
- Fixed formatting

Changes in v3:
- Fixed formatting

 Documentation/git-cat-file.txt | 45 ++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +32 -13
index ec30b5c574..e2a179770c 100644
@@ -89,26 +89,45 @@ 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. May not be combined with any other options or arguments
+	except --textconv, --filters, or --use-mailmap.
+	+
+	* 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 identities recorded in it were replaced
+	  by the mailmap mechanism.
 
 --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. May not be
+	combined with any other options or arguments except --textconv, --filters
+	or --use-mailmap.
+	+
+	* 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 identities recorded in it were replaced
+	  by the mailmap mechanism.
 
 --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 identities recorded in it were replaced
+	  by the mailmap mechanism.
+
 +
 `--batch-command` recognizes the following commands:
 +
Signature · 1 line
2.38.0.84.g1cc2920221
#6 lore raw
Quoted 2 lines · Siddharth Asthana

Changes in v3:
- Fixed formatting

This seems to format well, both with AsciiDoc and Asciidoctor.

Documentation/git-cat-file.txt OPTIONS · line 92

Quoted 5 lines
Documentation/git-cat-file.txt +1 -4
-	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. May not be combined with any other options or arguments

Unnecessary change here, but I'll let it pass this time.

Documentation/git-cat-file.txt OPTIONS · line 97

Quoted 5 lines
Documentation/git-cat-file.txt +5 -0
+	except --textconv, --filters, or --use-mailmap.
+	+
+	* When used with `--textconv` or `--filters`, the input lines
+	  must specify the path, separated by whitespace. See the section
+	  `BATCH OUTPUT` below for details.

OK.

Documentation/git-cat-file.txt OPTIONS · line 101

Quoted 4 lines
Documentation/git-cat-file.txt +4 -0
+	+
+	* When used with `--use-mailmap`, the info command shows the size
+	  the object if the identities recorded in it were replaced
+	  by the mailmap mechanism.

Did you mean "the object as if the identities ... were replaced"?

All three comments equally apply to the other two hunks for --batch-check and --batch-command.

Thanks.

#7 lore raw

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

In reply to Siddharth Asthana

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.

---

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

Changes in v2:
- Fixed the names in trailers in the commit message
- Updated the documentation to clearly state that the --batch-check, --batch-command and --batch options can only be used with --textconv, --filters or --use-mailmap.
- Fixed formatting

Changes in v3:
- Fixed formatting

Changes in v4:
- Fixed some grammatical errors

 Documentation/git-cat-file.txt | 45 ++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +32 -13
index ec30b5c574..db2bba9b65 100644
@@ -89,26 +89,45 @@ 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. May not be combined with any other options or arguments
+	except --textconv, --filters, or --use-mailmap.
+	+
+	* 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
+	  of the object as if the identities recorded in it were replaced
+	  by the mailmap mechanism.
 
 --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. May not be
+	combined with any other options or arguments except --textconv, --filters
+	or --use-mailmap.
+	+
+	* 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
+	  of the object as if the identities recorded in it were replaced
+	  by the mailmap mechanism.
 
 --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
+	  of the object as if the identities recorded in it were replaced
+	  by the mailmap mechanism.
+
 +
 `--batch-command` recognizes the following commands:
 +
Signature · 1 line
2.38.1.281.g0b8e165806.dirty
#8 lore raw

Hi Siddharth,

Quoted 3 lines · Siddharth Asthana

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

Why was this split off from the original series? I don't have a problem queueing the two topics independently, but an explanation of how the two interact would be appreciated.

E.g., does one depend on the other? Are they independent and can be merged at will? Should the integrator expect merge conflicts?

Thanks,
Taylor

#9 lore raw

Hi Taylor,

Quoted 11 lines · Taylor Blau

Hi Siddharth,

Quoted 3 lines · Siddharth Asthana

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

Why was this split off from the original series? I don't have a problem queueing the two topics independently, but an explanation of how the two interact would be appreciated.

I think it was split off from the original series because it's a documentation fix that could hopefully have graduated faster, and could perhaps have made it into v2.38.0. Or perhaps it could make it in v2.38.2 if such a bug fix release is made.

Quoted 2 lines

E.g., does one depend on the other? Are they independent and can be merged at will? Should the integrator expect merge conflicts?

The other patch series has some code changes that are independent, but the documentation changes it makes should probably go on top of this.

Thanks,
Christian.

#10 lore raw
Quoted 8 lines · Christian Couder
Quoted 3 lines

Why was this split off from the original series? I don't have a problem queueing the two topics independently, but an explanation of how the two interact would be appreciated.

I think it was split off from the original series because it's a documentation fix that could hopefully have graduated faster, and could perhaps have made it into v2.38.0. Or perhaps it could make it in v2.38.2 if such a bug fix release is made.

OK. Can we please get an updated round that clearly indicates which version it is? There are several messages in this thread with the same subject line and it is unclear which one reviewers are happy with.

Thanks,
Taylor

#11 lore raw
In reply to Siddharth Asthana
Quoted 8 lines · Siddharth Asthana

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.

Quoted 8 lines

---

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

I think Taylor is probably right that there should be a version number at the start of the subject line if the patch has already been sent many times with the same subject and mostly the same content to the list.

Quoted 7 lines

Changes in v2:
- Fixed the names in trailers in the commit message
- Updated the documentation to clearly state that the --batch-check, --batch-command and --batch options can only be used with --textconv, --filters or --use-mailmap.
- Fixed formatting

Quoted 5 lines

Changes in v3:
- Fixed formatting

Changes in v4:
- Fixed some grammatical errors

The version number should logically be "v4" according to the above.

Quoted 15 lines
 Documentation/git-cat-file.txt | 45 ++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +0 -4
index ec30b5c574..db2bba9b65 100644
@@ -89,26 +89,45 @@ 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.

Documentation/git-cat-file.txt OPTIONS · line 101

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+       on stdin. May not be combined with any other options or arguments
+       except --textconv, --filters, or --use-mailmap.
+       +
+       * 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
+         of the object as if the identities recorded in it were replaced
+         by the mailmap mechanism.

Sorry to realize this only at this point but actually I think the info command is only available when the --batch-command option is used, not when the --batch option is used.

As the --batch option prints both object information (which includes the size) and contents (which includes the idents), I think something like the following should be used here:

* When used with --use-mailmap, for commit and tag objects, the contents part of the output shows the identities replaced using the mailmap mechanism, while the information part of the output shows the size of the object as if it actually recorded the replacement identities.

Quoted 8 lines
Documentation/git-cat-file.txt +1 -5
 --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. May not be

Documentation/git-cat-file.txt OPTIONS · line 115

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+       combined with any other options or arguments except --textconv, --filters
+       or --use-mailmap.
+       +
+       * 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
+         of the object as if the identities recorded in it were replaced
+         by the mailmap mechanism.

Same remark about the info command as above.

As the --batch-check option prints only object information (which includes the size), I think something like the following should be used here:

* When used with --use-mailmap, for commit and tag objects, the printed object information shows the size of the object as if the identities recorded in it were replaced by the mailmap mechanism.

Quoted 7 lines
Documentation/git-cat-file.txt +0 -4
 --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.

Documentation/git-cat-file.txt OPTIONS · line 129

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+       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
+         of the object as if the identities recorded in it were replaced
+         by the mailmap mechanism.

s/info command/info command/

And I think it could be interesting to add:

- that it happens only for commits and tags, and
- that when the contents command is used the idents are replaced.

So maybe something like:

* When used with --use-mailmap, for commit and tag objects, the contents command shows the identities replaced using the mailmap mechanism, while the info command shows the size of the object as if it actually recorded the replacement identities.

Also this will become true only after your other patch series will be merged. Which means that you should say somewhere that either

- this patch should be merged only after the other patch series is merged, or
- it's a bug that the info command doesn't show the size of the
updated object and this is going to be fixed soon by the other patch series anyway.

Thanks for working on finishing this!
Christian.

#12 lore raw
Quoted 144 lines · Christian Couder
Quoted 8 lines · Siddharth Asthana

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.

Quoted 8 lines

---

This patch was previously sent as the first patch of a 3 patch series for adding the mailmap support in git cat-file options:
https://lore.kernel.org/git/[email protected]/

I think Taylor is probably right that there should be a version number at the start of the subject line if the patch has already been sent many times with the same subject and mostly the same content to the list.

Quoted 7 lines

Changes in v2:
- Fixed the names in trailers in the commit message
- Updated the documentation to clearly state that the --batch-check, --batch-command and --batch options can only be used with --textconv, --filters or --use-mailmap.
- Fixed formatting

Quoted 5 lines

Changes in v3:
- Fixed formatting

Changes in v4:
- Fixed some grammatical errors

The version number should logically be "v4" according to the above.

Quoted 15 lines
  Documentation/git-cat-file.txt | 45 ++++++++++++++++++++++++----------
  1 file changed, 32 insertions(+), 13 deletions(-)
Documentation/git-cat-file.txt +0 -4
index ec30b5c574..db2bba9b65 100644
@@ -89,26 +89,45 @@ 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.

Documentation/git-cat-file.txt OPTIONS · line 101

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+       on stdin. May not be combined with any other options or arguments
+       except --textconv, --filters, or --use-mailmap.
+       +
+       * 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
+         of the object as if the identities recorded in it were replaced
+         by the mailmap mechanism.

Sorry to realize this only at this point but actually I think the info command is only available when the --batch-command option is used, not when the --batch option is used.

As the --batch option prints both object information (which includes the size) and contents (which includes the idents), I think something like the following should be used here:

* When used with --use-mailmap, for commit and tag objects, the contents part of the output shows the identities replaced using the mailmap mechanism, while the information part of the output shows the size of the object as if it actually recorded the replacement identities.

Quoted 8 lines
Documentation/git-cat-file.txt +1 -5
  --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. May not be

Documentation/git-cat-file.txt OPTIONS · line 115

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+       combined with any other options or arguments except --textconv, --filters
+       or --use-mailmap.
+       +
+       * 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
+         of the object as if the identities recorded in it were replaced
+         by the mailmap mechanism.

Same remark about the info command as above.

As the --batch-check option prints only object information (which includes the size), I think something like the following should be used here:

* When used with --use-mailmap, for commit and tag objects, the printed object information shows the size of the object as if the identities recorded in it were replaced by the mailmap mechanism.

Quoted 7 lines
Documentation/git-cat-file.txt +0 -4
  --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.

Documentation/git-cat-file.txt OPTIONS · line 129

Quoted 10 lines
Documentation/git-cat-file.txt +10 -0
+       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
+         of the object as if the identities recorded in it were replaced
+         by the mailmap mechanism.

s/info command/info command/

And I think it could be interesting to add:

- that it happens only for commits and tags, and
- that when the contents command is used the idents are replaced.

So maybe something like:

* When used with --use-mailmap, for commit and tag objects, the contents command shows the identities replaced using the mailmap mechanism, while the info command shows the size of the object as if it actually recorded the replacement identities.

Also this will become true only after your other patch series will be merged. Which means that you should say somewhere that either

Quoted 7 lines

- this patch should be merged only after the other patch series is merged, or
- it's a bug that the info command doesn't show the size of the
updated object and this is going to be fixed soon by the other patch series anyway.

Thanks for working on finishing this!
Christian.

Thanks a ton for the review Christian :) Will make the suggested changes and send the v4 patch series.