lkml.org 
[lkml]   [2014]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: project wide: git config entry for [diff] renames=true
Date
Jeff King <peff@peff.net> writes:

> There is no such mechanism within git. We've resisted adding one because
> of the danger of something like:
>
> [diff]
> external = rm -rf /
>
> diff.renames is probably safe, but any config-sharing mechanism would
> have to deal with either whitelisting, or providing some mechanism for
> the puller to review changes before blindly following them.

It might be useful to add a "safe include" feature, perhaps? We
ship a small set of hardcoded default whitelist (diff.renames may be
included in there), and allow the user who do not want to be
affected to override it with

[include]
safe = !diff.renames

or even

[config]
safe = !*

at the same time allow them to add what we do not hardcode to it
using the same mechanism, e.g.

[config]
safe = merge.*

Then

[include]
safe
path = ../project.gitconfig

[include]
path = $HOME/.gitconfig-variant1

would only allow the variables include.safe deems safe to affect
us from the in-tree file, and use everything from my personal set in
my home directory.






\
 
 \ /
  Last update: 2014-09-25 21:21    [W:0.069 / U:2.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site