Re: Wrong gitignore precedence?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Wrong gitignore precedence?

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:04:30

Yohei Endo [off-list ref] writes:
I read the document of gitignore (http://git-scm.com/docs/gitignore),
and learned that $GIT_DIR/info/exclude has higher precedence than
the file specified by core.excludesfile.

But I noticed that patterns in core.excludesfile override patterns in
$GIT_DIR/info/exclude.
I tend to agree that info/exclude which is per-repository personal
preference should take precedence over $XDG_HOME/git/ignore which is
a personal preference across repositories that are accessed from
that machine.

It appears that the precedence was screwed-up between these two
files from the very beginning when 896bdfa2 (add: Support specifying
an excludes file with a configuration variable, 2007-02-27)
introduced core.excludesfile variable; seeing that nobody so far
complained with the discrepancy between the documentation and the
behaviour, it would indicate either (1) nobody reads the docs, or
(2) nobody uses both at the same time.

Swapping the order in the code this late in the game after 8 years
may affect people who have come to rely on the current behaviour and
never read the doc, which is somewhat worrying, though.

Re: Wrong gitignore precedence?

From: Yohei Endo <hidden>
Date: 2016-06-15 23:04:31

On Wed, 22 Apr 2015 11:59:04 -0700
Junio C Hamano [off-list ref] wrote:
Swapping the order in the code this late in the game after 8 years
may affect people who have come to rely on the current behaviour and
never read the doc, which is somewhat worrying, though.
I agree. I think the change should be well announced before
the fix is applied, like when the implicit value of
push.default was changed.

Thanks.
-- 
  遠藤 陽平 (Yohei Endo)
    yoheie@gmail.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help