Re: [PATCH v1 1/3] Introduce config variable "diff.primer"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 25 Jan 2009, Junio C Hamano wrote:

> I suspect it is pretty much orthogonal to the "use user's default without 
> being told from the command line", but it might be a worthy goal to introduce 
> a mechanism for the scripts to accept "safe" default options from the end user 
> while rejecting undesirable ones that would interfere with the way it uses 
> plumbing.
> 
> For example, gitk drives "git rev-list" and many options you give from the 
> command line (e.g. "gitk --all --simplify-merges -- drivers/") are passed to 
> the underlying plumbing.
> 
> This is a double edged sword.  When we add new features to git-rev-list, (e.g. 
> --simplify-merges or --simplify-by-decoration are fairly recent inventions 
> that did not exist when gitk was written originally), some of them can be 
> safely passed and automagically translates to a new feature in gitk.  
> However, use of some options (e.g. --reverse) breaks the assumption the tool 
> makes on the output from the underlying plumbing and should not be accepted 
> from the end-user.
> 
> It would be a good addition to our toolset if scripts like gitk can declare 
> which options and features are safe to accept from the end user to pass down 
> to the plumbing tools.  "git rev-parse", which lets the script sift between 
> options that are meant to affect ancestry traversal and the ones that are for 
> other (primarily diff family) commands, does not do anything fancy like that, 
> but it would be a logical place to do this sort of thing.
> 
> And it is not limited to "scripts" use.  A recent topic on rejecting colouring 
> options from being given to format-patch would also be helped with such a 
> mechanism if it is available to builtins.
> 
> Just an idle thought.


Yes yes yes yes!!!!!  I've been working on a response to your previous message, 
in which I address exactly this possibility.  Coming soon.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux