git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	james bardin <jbardin@bu.edu>, Todd Zullinger <tmz@pobox.com>,
	git@vger.kernel.org
Subject: Re: bash_completion outside repo
Date: Fri, 11 Sep 2009 18:05:07 -0400	[thread overview]
Message-ID: <20090911220506.GA27098@coredump.intra.peff.net> (raw)
In-Reply-To: <7vr5uduotz.fsf@alter.siamese.dyndns.org>

On Fri, Sep 11, 2009 at 02:57:28PM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > I think something like that needs to "belong" to the diff code itself. I
> > guess in the case of "diff", we could check all diff-related config at
> > diff setup time.
> 
> Not necessarily.  You do not want to care about color configuration if you are
> doing diff --raw for example.  The one that first uses the color variable
> should be able to notice the breakage, no?
> 
> > But what about something used in several places, like
> > core.quotepath?
> 
> Exactly the same way I checked what codepaths needed to fix for the
> autosetupmerge stuff.  core.quotepath internally sets quote_path_fully,
> and the sole user of quote_path_fully is sq_must_quote() which is only
> used by next_quote_pos().  So you can have your check very isolated.

I guess I'm just worried that in doing this for _every_ variable we are
going to run across cases where variables are used in several different
codepaths, and we are going to end up adding a large number of tests for
"is this thing valid". And if we forget one, it's going to cause us to
access some sentinel value that may cause a segfault.

But that is just my gut feeling. I haven't actually looked at doing a
full-scale conversion.

-Peff

  parent reply	other threads:[~2009-09-11 22:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10 15:13 bash_completion outside repo james bardin
2009-09-11 13:11 ` Michael J Gruber
2009-09-11 13:33 ` Todd Zullinger
2009-09-11 14:00   ` james bardin
2009-09-11 14:17     ` Jeff King
2009-09-11 14:36       ` Shawn O. Pearce
2009-09-11 15:09         ` Jeff King
2009-09-11 16:47           ` Jeff King
2009-09-11 20:43             ` Junio C Hamano
2009-09-11 21:12               ` Jeff King
2009-09-11 21:22               ` Junio C Hamano
2009-09-11 21:29                 ` Jeff King
2009-09-11 21:57                   ` Junio C Hamano
2009-09-11 22:04                     ` Junio C Hamano
2009-09-11 22:05                     ` Jeff King [this message]
2009-09-11 23:23           ` [PATCH] completion: Replace config --list with --get-regexp Todd Zullinger
2009-09-12 18:31             ` Shawn O. Pearce
2009-09-13 10:51               ` Bert Wesarg
2009-09-13 18:29                 ` Todd Zullinger
2009-09-13 20:40               ` Junio C Hamano

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=20090911220506.GA27098@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jbardin@bu.edu \
    --cc=spearce@spearce.org \
    --cc=tmz@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).