Skip to content

include.path options from git configuration are not followed #1402

Open

Description

@ericfrederich

Setup

At the bottom of your ~/.gitconfig put the following.

# Allow local overrides (i.e. for work)
[include]
        path = ~/.gitconfig.local

Then create a ~/.gitconfig.local file with the following contents.

# Overrides for work
[user]
        email = myself@work.com

Verify Git understands this by running git config user.email and see that it gives myself@work.com.
Another useful command is git config --list --show-origin | grep email

Proposed solution

Running git bug user new, when providing a suggestion for name, email, etc should run the appropriate Git command to retreive the default (git config user.name instead of whatever it's doing now.

Why I do this

I manage my personal dotfiles with a Git repo and stow, which seems to be a common practice.

At work I maintain a fork of this repo which has stuff like my GPG keys, my work email, etc, etc. So I put that stuff in ~/.gitconfig.local which is included from ~/.gitconfig.

Activity

  1. added
    kind/bugRelates to an issue
    priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release
    on May 8, 2025
  2. added this to the 0.8.2 milestone on May 8, 2025
  3. sudoforge commented on May 8, 2025

    @sudoforge
    Contributor

    Thanks for your report. The "new identity" workflow currently reads from the local and global configuration scopes, but go-git still doesn't follow includes, so this is something git-bug will need to implement itself.

  4. changed the title [-]New user suggestions don't respect git config[/-] [+]`include.path` options from git configuration are not followed[/+] on May 8, 2025
  5. added
    priority/backlogHigher priority than priority/awaiting-more-evidence
    and removed
    priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release
    on May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/identityRelates to identitieskind/bugRelates to an issuepriority/backlogHigher priority than priority/awaiting-more-evidence

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions