Re: bug: compactionheuristic config var case issue
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jun 15, 2016, 12:33 UTC
- Message-ID
- <CACsJy8Dp_s9avkkA4x=EfTjkObBNF8sB3zhkdgXmjkipDNdvNw@mail.gmail.com>
- In-Reply-To
- <8C006106-EED2-48B5-B9A5-6FCEB64597C1@bravo5.org>
On Wed, Jun 15, 2016 at 5:39 PM, Brian Lalor <blalor@bravo5.org> wrote:
> I’m very happy to see the new compaction heuristic option; it’s the way I always thought diffs should read! > > The config option in the documentation references “diff.compactionHeuristic”, but diff.c does a case-sensitive comparison on “diff.compactionheuristic” (note the case of the “h” in “heuristic”)
I think this misled you. All configuration variable names are lower-cased before they reach that strcmp() call, the whole picture is more like strcmp(tolower(var), "diff.compactionheuristic"), which I believe is correct.
> and `git diff` does not honor the config. Confusingly, `git config diff.compactionheuristic` returns true when diff.compactionHeuristic is set in ~/.gitconfig. When diff.compactionheuristic is set to true in ~/.gitconfig, the desired behavior is achieved. > > Thank you all for Git: it’s hard to remember the terrible world we lived in before it existed. :-)
-- Duy