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

Bugfix - don't require user.name and user.email... #819

Merged
merged 1 commit into from
Apr 14, 2023
Merged

Conversation

olsen232
Copy link
Collaborator

when GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL are set in the environment.

There's some complexity here that makes it tricky to just check we have exactly what we need: Kart never actually needs to know the user name or user email. What it needs to know are the author or committer's name and email. And in practise it always does know these, since, the OS will probably be able to supply one (eg by echo $USER), and these defaults from the OS are picked up by the calls we use: git var GIT_AUTHOR_IDENT and git var GIT_COMMITTER_IDENT

The simplest fix that keeps the good behaviour we have - prompting new users to fill in user name and email if they haven't already - without messing things up for power users who want to set those env vars - is just to keep the check as is, but disable it if any of the env vars are set.

Related links:

#812

Checklist:

  • Have you reviewed your own change?
  • Have you included test(s)?
  • Have you updated the changelog?

when GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL are set in the environment.

There's some complexity here that makes it tricky to just check we have
exactly what we need: Kart never actually needs to know the user name
or user email. What it needs to know are the author or committer's name
and email. And in practise it always does know these, since, the OS
will probably be able to supply one (eg by `echo $USER`), and these
defaults from the OS are picked up by the calls we use:
`git var GIT_AUTHOR_IDENT` and `git var GIT_COMMITTER_IDENT`

The simplest fix that keeps the good behaviour we have - prompting new
users to fill in user name and email if they haven't already - without
messing things up for power users who want to set those env vars - is just
to keep the check as is, but disable it if any of the env vars are set.
@olsen232 olsen232 requested a review from craigds April 14, 2023 02:26
@olsen232 olsen232 merged commit 5ca6e36 into master Apr 14, 2023
@olsen232 olsen232 deleted the fix-user-checks branch April 14, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants