-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mirror: Add .mailmap to the repository, sync with kernel's
Add a script to grep for the relevant entries in the .mailmap file of the kernel repository, and use it to build a .mailmap file for the mirror repo. Signed-off-by: Quentin Monnet <[email protected]>
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Changbin Du <[email protected]> <[email protected]> | ||
Geliang Tang <[email protected]> <[email protected]> | ||
Herbert Xu <[email protected]> | ||
Maxim Mikityanskiy <[email protected]> <[email protected]> | ||
Quentin Monnet <[email protected]> <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
usage () { | ||
echo "USAGE: ./update-mailmap.sh <bpftool-repo> <linux-repo>" | ||
exit 1 | ||
} | ||
|
||
BPFTOOL_REPO=${1-""} | ||
LINUX_REPO=${2-""} | ||
|
||
if [ -z "${BPFTOOL_REPO}" ] || [ -z "${LINUX_REPO}" ]; then | ||
echo "Error: bpftool or linux repos are not specified" | ||
usage | ||
fi | ||
|
||
BPFTOOL_MAILMAP="${BPFTOOL_REPO}/.mailmap" | ||
LINUX_MAILMAP="${LINUX_REPO}/.mailmap" | ||
|
||
tmpfile="$(mktemp)" | ||
cleanup() { | ||
rm -f "${tmpfile}" | ||
} | ||
trap cleanup EXIT | ||
|
||
grep_lines() { | ||
local pattern="$1" | ||
local file="$2" | ||
grep "${pattern}" "${file}" || true | ||
} | ||
|
||
while read -r email; do | ||
grep_lines "${email}$" "${LINUX_MAILMAP}" >> "${tmpfile}" | ||
done < <(git log --format='<%ae>' | sort -u) | ||
|
||
sort -u "${tmpfile}" > "${BPFTOOL_MAILMAP}" |