Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git hub config - refactor, rewrite, redux #217

Open
ingydotnet opened this issue Feb 23, 2016 · 3 comments
Open

git hub config - refactor, rewrite, redux #217

ingydotnet opened this issue Feb 23, 2016 · 3 comments

Comments

@ingydotnet
Copy link
Owner

This issue is meant to address all the outstanding config related issues in a
complete and holistic way.

This closes the following issues:

  • issue/213 (2016-02-13) open @perlpunk Allow to configure github hostname
  • issue/91 (2016-02-13) open @dolmen Fallback to "git config github.user" for github.login
  • issue/92 (2016-02-13) open @ingydotnet Allow git-hub config values to be per repo
  • issue/93 (2016-02-13) open @ingydotnet Support a git-hub.default-remote for config
  • pr/204 (2016-02-01) open @perlpunk add missing bash completion for config|config-unset
  • pr/185 (2016-02-10) open @perlpunk add environment variable/config for force-cache

Design for this issue will follow in comments.

@ingydotnet
Copy link
Owner Author

The primary change is where git hub config will read from and write to.

The read order should be:

  • $GIT_DIR/config if GIT_DIR exists
  • $GIT_HUB_ROOT/config if GIT_HUB_ROOT exists
  • ~/.git-hub/config
  • ~/.gitconfig
  • /etc/gitconfig

Where keys are read from a [git-hub] section.

The write order should be:

  • $GIT_HUB_ROOT/config if GIT_HUB_ROOT exists
  • ~/.git-hub/config

Any other behaviour can be accomplished with the git config command itself.


There will be a new doc section "Configuration" that explains all this. It
will be different from the git hub config command doc.

Config commands should hide auth tokens unless -T used.

Some keys can be taken from [github] sections if present.

@ewilhelm
Copy link

ewilhelm commented Jun 13, 2016

Seems like docs and code don't agree right now. Readme says ~/.git-hub/config and code only does ~/.githubconfig. nevermind, I must have gotten mixed up in updating (update: git-hub and git hub are different things for me despite having sourced the .rc file, I got /usr/lib/git-core/git-hub.)

Also, the .rc file sets GIT_HUB_ROOT, so I don't know about that as the default place to write unless this is made obvious by docs and setup/config output.

@perlpunk
Copy link
Collaborator

@ewilhelm where did you see code that still uses ~/.githubconfig ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants