Re: [PATCH v4 01/19] convert: make convert_attrs() and convert structs public
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Dec 5, 2020, 10:40 UTC
- Message-ID
- <CAP8UFD0Z-EU0=9qz8wYt4MSFqqmoDKnMxTbqgUJNVOR+qUZ3rA@mail.gmail.com>
- In-Reply-To
- <2726f6dc05c319e2baaf76a05d62426e0695fe65.1604521275.git.matheus.bernardino@usp.br>
On Wed, Nov 4, 2020 at 9:33 PM Matheus Tavares <matheus.bernardino@usp.br> wrote:
Show 8 quoted lines
> > From: Jeff Hostetler <jeffhost@microsoft.com> > > Move convert_attrs() declaration from convert.c to convert.h, together > with the conv_attrs struct and the crlf_action enum. This function and > the data structures will be used outside convert.c in the upcoming > parallel checkout implementation. Note that crlf_action is renamed to > convert_crlf_action, which is more appropriate for the global namespace.
It annoys me a bit that some things are called "conv_*" and others "convert_*". Maybe we could standardize everything, but it could be a separate patch series.
> Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> > [matheus.bernardino: squash and reword msg]
Not sure we want the above line, which could actually not be completely true if you rework the patch before it gets merged.
> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Show 16 quoted lines
> --- a/convert.h
> +++ b/convert.h
> @@ -63,6 +63,30 @@ struct checkout_metadata {
> struct object_id blob;
> };
>
> +enum convert_crlf_action {
> + CRLF_UNDEFINED,
> + CRLF_BINARY,
> + CRLF_TEXT,
> + CRLF_TEXT_INPUT,
> + CRLF_TEXT_CRLF,
> + CRLF_AUTO,
> + CRLF_AUTO_INPUT,
> + CRLF_AUTO_CRLF
> +};Maybe we should also prepend "CONVERT_" to the values?