| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Matteo Collina <hello@matteocollina.com>
| const defaultShow = git(repoDir, ['show', '--quiet', '--format=medium', 'HEAD']) | ||
| const rawShow = git(repoDir, ['show', '--no-mailmap', '--quiet', '--format=medium', 'HEAD']) | ||
|
|
||
| tt.match(defaultShow, | ||
| /Author:\s+Matteo Collina <matteo\.collina@gmail\.com>/, | ||
| 'git show applies mailmap by default') | ||
| tt.match(rawShow, | ||
| /Author:\s+Matteo Collina <hello@matteocollina\.com>/, | ||
| 'git show --no-mailmap preserves the raw author email') | ||
|
|
There was a problem hiding this comment.
This would make the test fail for unrelated reasons (e.g if the git global config disables mailmaps)
Sorry, something went wrong.
| const repoDir = mkdtempSync(join(tmpdir(), 'core-validate-commit-')) | ||
| const env = { | ||
| GIT_AUTHOR_NAME: 'Matteo Collina', | ||
| GIT_AUTHOR_EMAIL: 'hello@matteocollina.com', | ||
| GIT_COMMITTER_NAME: 'Matteo Collina', | ||
| GIT_COMMITTER_EMAIL: 'hello@matteocollina.com' | ||
| } | ||
|
|
||
| git(repoDir, ['init', '-b', 'main']) | ||
| git(repoDir, ['config', 'user.name', 'Test User']) | ||
| git(repoDir, ['config', 'user.email', 'test@example.com']) |
There was a problem hiding this comment.
Can we instead use this repo like is done for the other tests?
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Testing