-
Notifications
You must be signed in to change notification settings - Fork 2.5k
issue #3751 (Function to parse author and committer information from environment) #4409
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
Conversation
(Function to parse author and committer information from environment)
…ntation (yet to change .h file and add tests)
* long line wrapping * copy/paste of local variable name * static keyword for impl_ method
Hi @neshang - it was nice to meet you at the hackathon yesterday and to collaborate on the #3751 issue. Thanks especially for spotting that the initial With the latest batch of commits the test failures we were debugging at the end of the hackathon are now also fixed: the problem was with the test code itself i.e. if test A sets an environment variable then it also needs to unset (or reset) it afterwards or else test B (running after test A) could fail if it assumes that the environment variable concerned is unset. Also now present is some test coverage for the
function pointer way of implementing that is perhaps a little too fancy a solution. Next steps:
|
Pull request now updated to include docs in signature.h and CHANGELOG.md entry. Yet to look fully at the 'AppVeyor build failed' partial failure, from a quick look it seems unrelated? |
I agree that this looks unrelated - I'll restart the AppVeyor build so that it passes and will review this soon. Thanks! 😁 |
When creating an action signature (e.g. for a commit author and committer) read the following environment variables that can override the configuration options: * `GIT_AUTHOR_NAME` is the human-readable name in the "author" field. * `GIT_AUTHOR_EMAIL` is the email for the "author" field. * `GIT_AUTHOR_DATE` is the timestamp used for the "author" field. * `GIT_COMMITTER_NAME` sets the human name for the "committer" field. * `GIT_COMMITTER_EMAIL` is the email address for the "committer" field. * `GIT_COMMITTER_DATE` is used for the timestamp in the "committer" field. * `EMAIL` is the fallback email address in case the user.email configuration value isn't set. If this isn't set, Git falls back to the system user and host names. This is taken from the git documentation chapter "10.8 Environment Variables": https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables This PR adds support for reading these environment variables by adding two new functions `git_signature_default_author` and `git_signature_default_committer` and deprecates the `git_signature_default` function. Fixes: libgit2#3751 Prior work: * libgit2#4409 * libgit2#5479 * libgit2#6290
When creating an action signature (e.g. for a commit author and committer) read the following environment variables that can override the configuration options: * `GIT_AUTHOR_NAME` is the human-readable name in the "author" field. * `GIT_AUTHOR_EMAIL` is the email for the "author" field. * `GIT_AUTHOR_DATE` is the timestamp used for the "author" field. * `GIT_COMMITTER_NAME` sets the human name for the "committer" field. * `GIT_COMMITTER_EMAIL` is the email address for the "committer" field. * `GIT_COMMITTER_DATE` is used for the timestamp in the "committer" field. * `EMAIL` is the fallback email address in case the user.email configuration value isn't set. If this isn't set, Git falls back to the system user and host names. This is taken from the git documentation chapter "10.8 Environment Variables": https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables This PR adds support for reading these environment variables by adding two new functions `git_signature_default_author` and `git_signature_default_committer` and deprecates the `git_signature_default` function. Fixes: libgit2#3751 Prior work: * libgit2#4409 * libgit2#5479 * libgit2#6290
Closing as stale 🙏 |
work-in-progress for issue #3751 (Function to parse author and committer information from environment)