Skip to content
This repository was archived by the owner on Jul 30, 2019. It is now read-only.
This repository was archived by the owner on Jul 30, 2019. It is now read-only.

encapsulate tidbits' .gitconfig in a separate file #10

@brandonzylstra

Description

@brandonzylstra

Rather than inserting the configuration for Git inside the user's global configuration (~/.gitconfig), it seems preferable to include it by simply adding something like

[include]
    path = ~/.tidbits/gitconfig

(For reference, see: git/git@9b25a0b)

The main problem with overloading the user's ~/.gitconfig is that we can easily wind up with instances where there are multiple values for one configuration setting, which can prevent the git config command from functioning. For instance, suppose both the Tidbits section and the rest of a config file both have:

[example "test"]
  blah = yada

and the user runs a script that executes git config --global example.test.blah yackety, they will get an error:

warning: example.test.blah has multiple values
error: cannot overwrite multiple values with a single value
       Use a regexp, --add or --replace-all to change example.test.blah.

Inclusion of external config files should work in Git 1.7.10.2 and up. If we wanted to support earlier versions (and I don't think we care about them) we could put the Tidbits configurations in /etc/gitconfig (or just maintain the current behavior for ancient versions of Git).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions