SourceTree does not respect includeIf conditionals in .gitconfig

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • None
    • Affects Version/s: 2.6
    • Component/s: Git
    • Environment:

      Mac OS X 10.12.6 (16G29)

      Using with with Github.

    • Severity 2 - Major

      I have the following at the start of my .gitconfig:

      [includeIf "gitdir/i:~/"]
      {{ path = ~/.gitconfig-personal}}

      [includeIf "gitdir/i:~/Development/_Public/"]
      {{ path = ~/.gitconfig-github}}

      The two files each contain the following:

      [user]
      {{ name = John Yeates}}
      {{ email = my.email.address}}

      with the email address differing (see https://help.github.com/articles/about-commit-email-addresses/ for why I do this — and please consider adding such a feature to Bitbucket, BTW…)

      When I commit from the command-line, repos stored in ~/Development/Public have the email address in .gitconfig-github applied to them, rather than the one in ~/.gitconfig-personal.

      However, when I try to commit in SourceTree, it does not parse either ~/.gitconfig-personal or ~/.gitconfig-github, and instead merely notes that there is no name or email defined in ~/.gitconfig, and prompts me to enter them.

      This totally ruins the point of having this automation, because it means I now need to enter an email address manually for each repo.

      Please could you support conditional configs? The easy way for name and email is to call `git config --get user.email` and `git config --get user.name` rather than parsing the .gitconfig yourself…

              Assignee:
              Unassigned
              Reporter:
              Deleted Account (Inactive)
              Votes:
              9 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: