git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: David Pisoni <dpisoni@gmail.com>
Cc: GIt Mailing List <git@vger.kernel.org>,
	Git Maintainer <gitster@pobox.com>
Subject: Re: [PATCH] Adds 'stash.index' configuration option
Date: Thu, 12 May 2011 09:14:09 +0200	[thread overview]
Message-ID: <4DCB88C1.20105@drmicha.warpmail.net> (raw)
In-Reply-To: <D80C1130-8DE6-457E-B203-FCF25B8ED72C@gmail.com>

David Pisoni venit, vidit, dixit 12.05.2011 00:57:
> 
> Setting 'stash.index' config option changes 'git-stash pop|apply' to  
> behave
> as if '--index' switch is always supplied.
> 'git-stash pop|apply' provides a --no-index switch to circumvent  
> config default.

This is yet another incarnation of

foo.bar = true

meaning that command "git foo" defaults to "git foo --bar". (Admittedly,
this is about subcommands of foo.)

It has the same problems (possibly breaking scripts). But more
importantly, it inflates the code with every such incarnation we add.
Have we really agreed that we introduce these one-by-one rather than
doing something generic like

uiopts.<cmd> = <optionlist>

with which you would do

uiopts.stash = "--index"

and hopefully be script-safe (again, ignoring the subcommand issue)?

Michael

  parent reply	other threads:[~2011-05-12  7:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 22:57 [PATCH] Adds 'stash.index' configuration option David Pisoni
2011-05-11 23:46 ` Junio C Hamano
2011-05-12  0:26   ` Junio C Hamano
2011-05-12  0:48     ` David Pisoni
2011-05-12  0:54       ` Junio C Hamano
2011-05-12  7:14 ` Michael J Gruber [this message]
2011-05-12  8:04   ` Jeff King
2011-05-12  8:14     ` Michael J Gruber
2011-05-12  8:22       ` Jeff King
2011-05-12 14:35         ` RFC proposal: set git defaults options from config Michael J Gruber
2011-05-12 22:36           ` David Pisoni
2011-05-16 11:05             ` Jeff King
2011-05-16 11:02           ` Jeff King
2011-05-16 12:54             ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DCB88C1.20105@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=dpisoni@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).