Re: [PATCH] config: complain about --local outside of a git repo
- From
Jeff King <peff@peff.net>
- Date
- May 13, 2017, 02:04 UTC
- Message-ID
- <20170513020409.kyqglojregge44mt@sigill.intra.peff.net>
- In-Reply-To
- <20170513000442.GH27400@aiede.svl.corp.google.com>
On Fri, May 12, 2017 at 05:04:42PM -0700, Jonathan Nieder wrote:
Show 17 quoted lines
> > diff --git a/builtin/config.c b/builtin/config.c
> > index 3a554ad50..ad7c6a19c 100644
> > --- a/builtin/config.c
> > +++ b/builtin/config.c
> > @@ -496,6 +496,9 @@ int cmd_config(int argc, const char **argv, const char *prefix)
> > usage_with_options(builtin_config_usage, builtin_config_options);
> > }
> >
> > + if (use_local_config && nongit)
> > + die(_("--local only be used inside a git repository"));
> > +
>
> The output would be
>
> fatal: --local only be used inside a git repository
>
> Is that missing a "should" before "only"?Urgh, I meant "can" (I had originally written "only makes sense" but changed it at the list minute).
I'll re-roll after thinking about the test issues raised in the other part of the thread.
-Peff