https://github.com/kevinburke/write_mailmap
Easy generate an AUTHORS file from the Git commit history
https://github.com/kevinburke/write_mailmap
contributors git golang mailmap
Last synced: 8 months ago
JSON representation
Easy generate an AUTHORS file from the Git commit history
- Host: GitHub
- URL: https://github.com/kevinburke/write_mailmap
- Owner: kevinburke
- License: mit
- Created: 2016-11-09T21:39:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-09-04T22:22:51.000Z (almost 3 years ago)
- Last Synced: 2025-08-02T15:50:58.148Z (10 months ago)
- Topics: contributors, git, golang, mailmap
- Language: Makefile
- Homepage:
- Size: 14.6 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS.txt
Awesome Lists containing this project
README
# write_mailmap
Use this program and a .mailmap file to apply fixes to your AUTHORS list.
Use a `.mailmap` file to merge entries in a commit log, for example:
```
Kevin Burke Kevin Burke
```
If I have commits under both of those email addresses, they'll get merged into
one, for the purposes of this program's output.
For more, see
https://stacktoheap.com/blog/2013/01/06/using-mailmap-to-fix-authors-list-in-git/.
## Install
Find your target operating system (darwin, windows, linux) and desired bin
directory, and modify the command below as appropriate:
curl --silent --location --output=/usr/local/bin/write_mailmap https://github.com/kevinburke/write_mailmap/releases/download/0.2/write_mailmap-linux-amd64 && chmod 755 /usr/local/bin/write_mailmap
On Travis, you may want to create `$HOME/bin` and write to that, since
/usr/local/bin isn't writable with their container-based infrastructure.
The latest version is 0.2.
If you have a Go development environment, you can get the binary by running the
following:
```bash
go get -u github.com/kevinburke/write_mailmap
```
## Usage
```
write_mailmap > AUTHORS.txt
```
You can put it in a Makefile like this. Run `make authors` and the dependencies
will automatically download.
```
WRITE_MAILMAP := $(GOPATH)/bin/write_mailmap
$(WRITE_MAILMAP):
curl --silent --location --output=$(WRITE_MAILMAP) https://github.com/kevinburke/write_mailmap/releases/download/0.2/write_mailmap-linux-amd64
chmod 755 $(WRITE_MAILMAP)
force: ;
AUTHORS.txt: force | $(WRITE_MAILMAP)
$(WRITE_MAILMAP) > AUTHORS.txt
authors: AUTHORS.txt
```
Then run `make authors` and you'll get an AUTHORS.txt and your contributors
don't have to worry about how to install it.