also sprach martin f krafft <madd...@debian.org> [2014-09-09 07:04 +0200]:
>   Bottom-up is when ~/.mrconfig does not know about
>   ~/subdir/.mrconfig or ~/subdir/another/.mrconfig. If I now run mr
>   in ~/subdir/another,
> 
>     - ~/.mrconfig and ~/subdir/another/.mrconfig *are* being read
>     - but ~/subdir/.mrconfig is *not* read
> 
> I think this is an inconsistency. When run in bottom-up fashion,
> then either ~/.mrconfig should also be ignored, or all parent config
> files need to be included.

The loadconfig() function does something prefixed by a comment:

  # copy in defaults from first parent

in which it walks up the tree until it finds a config file that
defines a DEFAULT section. It then loads this section into the
current config space, and ends the loop, i.e. it only copies from
the first parent, as specified in the comment.

I do not understand why it does this. Can you enlighten me? Why are
you loading ~/.mrconfig explicitly and unconditionally, and merge
DEFAULT from the first parent, rather than just backtracking the
tree and loading all configs it finds? You can still load
~/.mrconfig first and explicitly, as the code has provisions to
prevent double-loading.

Thanks,

-- 
 .''`.   martin f. krafft <madduck@d.o> @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

Reply via email to