Skip to content

git-pull-request needs user.email but does not check global includes #546

@smemsh

Description

@smemsh

In git-pull-request there is on L29:

user=$(git config --global user.email)
test -z "$user" && abort "git config user.email required"

but if I set user.email from an include section via ~/.gitconfig, this is not shown due to this default behavior of git:

--[no-]includes
        Respect include.*  directives in config files when looking up
        values. Defaults to off when a specific file is given (e.g., using
        --file, --global, etc) and on when searching all config files.

this would force me to set user.email directly in ~/.gitconfig and not in an [include] section. I think this is not really a sane default for git, but nonetheless, that's what they chose. Therefore git-pull-request needs to add --includes to this line to pull it in. What might also work is removing --global (which works fine, and pulls in includes). I don't see why it's needed; only the value is really needed, it should not matter if it comes from repo-local, global, include, or wherever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions