Web lists-archives.com

Re: [PATCH] RFC: Introduce '.gitorderfile'

On Wed, Jul 12, 2017 at 02:08:35PM -0700, Stefan Beller wrote:

> > I could see somebody arguing that format-patch should respect a project
> > preference, since its primary purpose is to communicate your work to the
> > rest of the project.
> >
> > But then you could make a similar argument for other diff options, too.
> This similar argument would be to have a in-tree configuration for
> --unified=<N> for example?

Yes, that was exactly the option I was thinking of. :)

> This triggers two reactions for me:
> (a) We should totally do that.
>   Different projects have different coding styles (e.g. opening brace
>   in its own new line or at the end of the condition), which very much impacts
>   how useful the context is. So, sure, the project knows best what their
>   preference is.
> (b) It's a rabbit hole to go down.
>   Any config option that format-patch respects can be argued to be useful
>   to be preset by a project. So in the end we'd have a ".gitconfig"
> file offering
>   good defaults for people using that project. This may have security
> implications.
>   And it's a lot of work.
> I see your point for (b), I'll think about it more.

And yes, I had both of those reactions, too. We've had the
"project-level .gitconfig" discussion many times over the years. And it
generally comes back to "you can ship a snippet of config and then give
people a script which adds it to their repo".