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

Config reader does not support includeIf #1053

Open
@Svenito

Description

@Svenito

If the.gitconfig file includes anincludeIf directive, the config parser doesn't respect it.

~/.gitconfig file contents:

[includeIf "gitdir:~/work/git/"]        path = ~/.gitconfig.work[user]        email = my@email.com        name = Me        useconfigonly = true

~/.gitconfig.work contents

[user]        email: work@email.com        name = Work

Change to the~/work/git/project directory and rungit config -l and notice that the name is set toWork. Running the following in a Python REPL

import osfrom git import Reporepo = Repo(os.getcwd())repo.repo.config_reader().get_value("user", "name")'Me'

And if the user hasn't got a default user setting in the~/gitconfig file, it will throwConfigParser.NoSectionError: No section: 'user' which is expected.

Config parser should support theincludeIf directive in the config file.

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