From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbaIYSxn (ORCPT ); Thu, 25 Sep 2014 14:53:43 -0400 Received: from smtp.pobox.com ([208.72.237.35]:56414 "EHLO smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752386AbaIYSxl (ORCPT ); Thu, 25 Sep 2014 14:53:41 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=AriPtrgvl9YeNDkGJ2RJPUbt+zR3Hn0u B/OaAuhU3OsFMYckgmF35c+o6CpBDXjsGtNbyJRo8Bh9tiTn2Kf/UCv3BQbcXW+D EhKrTZPpclKfDIVlli9HB8sBkgNvDEauPD/PSi2IMReLNEbOxUaa92hzCc3qY3/h zZ354GARLRw= From: Junio C Hamano To: Jeff King Cc: Joe Perches , Greg Kroah-Hartman , Michal Sojka , linux-usb@vger.kernel.org, Alan Stern , Bryan Wu , Felipe Balbi , Linux LED Subsystem , linux-kernel@vger.kernel.org, michal.vokac@comap.cz, git Subject: Re: project wide: git config entry for [diff] renames=true References: <1411591401-5874-1-git-send-email-sojka@merica.cz> <1411591401-5874-4-git-send-email-sojka@merica.cz> <20140925150353.GA15325@kroah.com> <1411660111.4026.24.camel@joe-AO725> <20140925180005.GA11755@peff.net> Date: Thu, 25 Sep 2014 11:53:38 -0700 In-Reply-To: <20140925180005.GA11755@peff.net> (Jeff King's message of "Thu, 25 Sep 2014 14:00:05 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 439BD69E-44E5-11E4-8663-D931C4D60FE0-77302942!pb-smtp0.pobox.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jeff King 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.