On Tue, Sep 13, 2016 at 03:00:17PM -0700, Stefan Beller wrote:
> On Mon, Sep 12, 2016 at 8:23 PM, Jeff King <p...@peff.net> wrote:
> > 2. If you're in a subdirectory of a repository, then we
> > still try to read ".git/config", but it generally
> > doesn't exist. So "diff --no-index" there does not
> > respect repo config.
> So IIUC your cover letter even this /used/ to work but
> broke only recently? So I feel like the message is a bit
> misleading (i.e. you argue for a change in behavior instead of
> calling it a bug fix for a regression. I think a bug fix for a regression
> is harder to revert as compared to a "new" behavior)
No, this has always been broken. What broke recently is the tests
covered in patch 14 related to git-init.
IOW, we have always done this "blind read" of .git/config, ever since
the early days. It was always wrong, but was mostly overlooked because
it worked often enough and usually didn't cause other problems. But
because of the caching and lazy-reading done by git_config() these days
(and get_shared_repository() which builds on it), you can get quite
confusing and buggy effects if you lazy-read at the wrong time.