Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Configparser does not respect order of config files with includes #627

Closed
@DanielSiepmann

Description

@DanielSiepmann

When you have an include statement in the user.gitconfig there content will take precedence over the local.git/config of the repository.

E.g. the following code:
entry = repo.config_reader().get_value('gitlab', 'url')

With the following config setup:

~/.gitconfig:

[include]path = ~/.gitconfig-local[gitlab]url = url1

~/.gitconfig-local:

[gitlab]url = url2

.git/config:

[gitlab]url = url3

Will returnurl2 I would expect to receiveurl3 instead as local config should take precedence as the include was in a more global config.

Looks like the issue resides inside theread function e.g.

files_to_read.append(include_path)
will just add the includes to the list, which is just wrong, as they should be read instantly to overwrite just the already known configs.

As the function is just to big, I'm not able to provide a fix.

Versions in use:

>>> import git; git.__version__'2.1.3'
python --versionPython 2.7.13

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp