Thread (1 message) 1 message, 1 author, 2018-09-10

Re: git silently ignores include directive with single quotes

From: Junio C Hamano <hidden>
Date: 2018-09-10 20:10:33

Stas Bekman [off-list ref] writes:
[include]
    path = .gitconfig

Not realizing that the two were not in the same folder. And probably
assuming that .git/config was referring to the root of repository, and
not relative to .git/, which is a reasonable assumption.

Of course he had no way of resolving this as git wasn't telling him
where it wasn't finding the file. i.e.

Can't find: ~/myrepo/.git/.gitconfig

which would have instantly told him where the problem was.
Yeah, I think Peff's idea of introducing a variant of include.path
that reports missing file would make sense for such a use case.

The code needs to turn a relative path to an absolute one by taking
the value as path relative to the including configuration file, so
we should already have the path to use in the error reporting, if we
were to go that route.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help