diff mbox series

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

Message ID 20220926091442.222876-1-siddharthasthana31@gmail.com (mailing list archive)
State Superseded
Headers show
Series doc/cat-file: allow --use-mailmap for --batch options | expand

Commit Message

Siddharth Asthana Sept. 26, 2022, 9:14 a.m. UTC
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 <christian.couder@gmail.com>
Mentored-by: John Cai <johncai86@gmail.com>
Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com>
---

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/20220916205946.178925-2-siddharthasthana31@gmail.com/

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(-)

Comments

John Cai Sept. 26, 2022, 2:11 p.m. UTC | #1
Hi Siddarth,

On 26 Sep 2022, at 5:14, Siddharth Asthana wrote:

> 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 <christian.couder@gmail.com>
> Mentored-by: John Cai <johncai86@gmail.com>
> Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com>
> ---
>
> 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/20220916205946.178925-2-siddharthasthana31@gmail.com/
>
> 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(-)
>
> diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
> index ec30b5c574..2a8f050a29 100644
> --- a/Documentation/git-cat-file.txt
> +++ b/Documentation/git-cat-file.txt
> @@ -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.

> +	+
> +	* 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.

>
>  --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.

Same as above

>  --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.

Same as above

> +
>  +
>  `--batch-command` recognizes the following commands:
>  +
> -- 
> 2.38.0.rc1.4.g29ac4cf309.dirty

thanks!
Siddharth Asthana Oct. 21, 2022, 10:32 a.m. UTC | #2
On 26/09/22 19:41, John Cai wrote:
> Hi Siddarth,
> 
> On 26 Sep 2022, at 5:14, Siddharth Asthana wrote:
> 
>> 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 <christian.couder@gmail.com>
>> Mentored-by: John Cai <johncai86@gmail.com>
>> Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com>
>> ---
>>
>> 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/20220916205946.178925-2-siddharthasthana31@gmail.com/
>>
>> 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(-)
>>
>> diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
>> index ec30b5c574..2a8f050a29 100644
>> --- a/Documentation/git-cat-file.txt
>> +++ b/Documentation/git-cat-file.txt
>> @@ -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.
> 
>> +	+
>> +	* 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.
> 
>>
>>   --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.
> 
> Same as above
> 
>>   --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.
> 
> Same as above
> 
>> +
>>   +
>>   `--batch-command` recognizes the following commands:
>>   +
>> -- 
>> 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.
diff mbox series

Patch

diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
index ec30b5c574..2a8f050a29 100644
--- a/Documentation/git-cat-file.txt
+++ b/Documentation/git-cat-file.txt
@@ -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:
 +