Bugfix - don't require user.name
and user.email
...
#819
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andgit 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: