Re: [PATCH v9 11/11] Documentation: add documentation for 'git interpret-trailers'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(culling cc list)
Hi,

Christian Couder wrote:

> [Subject: Documentation: add documentation for 'git interpret-trailers']
>
> Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx>

This should be squashed into the patch that introduces the
interpret-trailers command, IMHO (or if it should be reviewed
separately, it can be an earlier patch).  That way, someone looking at
when the command was introduced and wanting to understand what it was
originally meant to do has the information close by.

Thanks for picking up the 'git commit --fixes' topic and your steady
work improving the series.

[...]
> --- /dev/null
> +++ b/Documentation/git-interpret-trailers.txt
> @@ -0,0 +1,123 @@
> +git-interpret-trailers(1)
> +=========================
> +
> +NAME
> +----
> +git-interpret-trailers - help add stuctured information into commit messages
> +
> +SYNOPSIS
> +--------
> +[verse]
> +'git interpret-trailers' [--trim-empty] [(<token>[(=|:)<value>])...]
> +
> +DESCRIPTION
> +-----------
> +Help add RFC 822-like headers, called 'trailers', at the end of the
> +otherwise free-form part of a commit message.
> +
> +This command is a filter. It reads the standard input for a commit
> +message and applies the `token` arguments, if any, to this
> +message. The resulting message is emited on the standard output.

Do you have an example?  Does it work like this?

	$ git interpret-trailers 'signoff=Jonathan Nieder <jrnieder@xxxxxxxxx>' <<EOF
	> foo bar baz qux
	> EOF
	foo bar baz qux

	Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
	$

A short EXAMPLES section could help.

If I am understanding it correctly, would a name like 'git add-trailers'
work?  How do I read back the trailers later?

[...]
> +By default, a 'token=value' or 'token:value' argument will be added
> +only if

Why support both '=' and ':'?  Using just one would make it easier to
grep through scripts to see who is adding signoffs.

Hope that helps,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]