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

From: Junio C Hamano <[email-masked]>
Date: Wed, 28 May 2014 12:35:37 -0700

Christian Couder <[email-masked]> writes:

> +The trailers are recognized in the input message using the following
> +rules:
> +
> +* only lines that contains a ':' (colon) are considered trailers,
> +
> +* the trailer lines must all be next to each other,
> +
> +* after them it's only possible to have some lines that contain only
> +  spaces, and then a patch; the patch part is recognized using the
> +  fact that its first line starts with '---' (three minus signs),
> +
> +* before them there must be at least one line with only spaces.

While I agree with Michael on the other thread that we should limit
the syntax and start with ':' only, if you really want to allow
random syntax like "Bug #12345" and "Acked-by= Peff", for which you
have demonstrations in the tests in the other patch, the above rule
should be updated to also allow prefix matches to possible set of
keys defined by the user, so that an existing line that is produced
by your tool, e.g. "Acked-by= Peff", can be picked up as matching
with some token having a key "Acked-by= ".  Otherwise, the input
side of your tool is inconsistent with the output side of your own
tool, and that will make the flexiblity of the output side useless.