project wide: git config entry for [diff] renames=true

2014-09-25 Thread Joe Perches
On Thu, 2014-09-25 at 17:03 +0200, Greg Kroah-Hartman wrote:

 In the future, please generate a git move diff, which makes it easier
 to review, and prove that nothing really changed.  It also helps if the
 file is a bit different from what you diffed against, which in my case,
 was true.

Maybe it'd be possible to add 

[diff]
renames = true

to the .git/config file.

but I don't find a mechanism to add anything to the
.git/config and have it be pulled.



--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: project wide: git config entry for [diff] renames=true

2014-09-25 Thread Jeff King
On Thu, Sep 25, 2014 at 08:48:31AM -0700, Joe Perches wrote:

 On Thu, 2014-09-25 at 17:03 +0200, Greg Kroah-Hartman wrote:
 
  In the future, please generate a git move diff, which makes it easier
  to review, and prove that nothing really changed.  It also helps if the
  file is a bit different from what you diffed against, which in my case,
  was true.
 
 Maybe it'd be possible to add 
 
 [diff]
   renames = true
 
 to the .git/config file.
 
 but I don't find a mechanism to add anything to the
 .git/config and have it be pulled.

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.

-Peff
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: project wide: git config entry for [diff] renames=true

2014-09-25 Thread Joe Perches
On Thu, 2014-09-25 at 14:00 -0400, Jeff King wrote:
 On Thu, Sep 25, 2014 at 08:48:31AM -0700, Joe Perches wrote:
 
  On Thu, 2014-09-25 at 17:03 +0200, Greg Kroah-Hartman wrote:
  
   In the future, please generate a git move diff, which makes it easier
   to review, and prove that nothing really changed.  It also helps if the
   file is a bit different from what you diffed against, which in my case,
   was true.
  
  Maybe it'd be possible to add 
  
  [diff]
  renames = true
  
  to the .git/config file.
  
  but I don't find a mechanism to add anything to the
  .git/config and have it be pulled.
 
 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.

Another mechanism might be to add a repository
top level .gitconfig and add whatever to that.



--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: project wide: git config entry for [diff] renames=true

2014-09-25 Thread Junio C Hamano
Joe Perches j...@perches.com writes:

 On Thu, 2014-09-25 at 14:00 -0400, Jeff King wrote:
 ...
 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.

 Another mechanism might be to add a repository
 top level .gitconfig and add whatever to that.

That could be smaller half of an implementation detail of one of the
two possibilities Jeff mentioned i.e. mechanism for the puller to
review changes before blindly following.  It gives the transfer
part.  You still need a new mechanism to make that file that is
tracked in the repository to be used as part of your configuration
variable set after letting the puller to review and approve.

A puller who blindly trust the project could use the include
mechanism from your .git/config to include a file with a well-known
name that is tracked by the project _without_ review or approval.  I
doubt we would recommend that in an open source setting, though.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: project wide: git config entry for [diff] renames=true

2014-09-25 Thread Junio C Hamano
Jeff King p...@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.




--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html