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

Use git local configuration instead of global when available #68

Closed
josecelano opened this issue Jan 4, 2022 · 1 comment · Fixed by #108
Closed

Use git local configuration instead of global when available #68

josecelano opened this issue Jan 4, 2022 · 1 comment · Fixed by #108
Labels
good first issue Good for newcomers

Comments

@josecelano
Copy link
Member

Why are we choosing to use the git global configuration over specifying it locally to the particular git repository?

Originally posted by @da2ce7 in #40 (comment)

@josecelano josecelano added the good first issue Good for newcomers label Jan 4, 2022
@josecelano
Copy link
Member Author

I think we should not set the committer configuration at all. The user of the command should preset the configuration. Git will choose following the priorities (local, global, system ...). Maybe we only should allow the user to overwrite committer info with options. That means we only have to remove the default value for the option.

git_user_name: str = typer.Argument(
    default_git_user_name, envvar="NL_GIT_USER_NAME"
),
git_user_email: str = typer.Argument(
    default_git_user_email, envvar="NL_GIT_USER_EMAIL"
),
git_user_signingkey: str = typer.Argument(
    default_git_user_signingkey, envvar="NL_GIT_USER_SIGNINGKEY"
),

Maybe the default configuration was added because GitPython package (the wrapper for Git we are using) was not getting that configuration correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant