-
Notifications
You must be signed in to change notification settings - Fork 0
/
Co-Authored-By
executable file
·48 lines (40 loc) · 1.51 KB
/
Co-Authored-By
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/bash
# HOW TO automate co-author attribution
# 1) At beginning of session, 'enable' a co-author by removing leading '#'
#
# 2.1) Using from command line
# commit -m "A real commit message$(bash ./Co-Authored-By.sh)"
#
# 2.2) Using in an IDE
# Use command line to copy co-authors into copy/paste buffer...
# `./Co-Authored-By.sh)" | pbcopy`
# ... then use `paste` inside the IDE commit message dialog
#
# 3) Subsequent commits can bring back this command line for simple modification
function cat_co_authored_by {
cat <<CO-AUTHORED-BY
#Co-Authored-By: Gregor Riegler <[email protected]>
Co-Authored-By: Mike Kienenberger <[email protected]>
#Co-Authored-By: Nitsan Avni <[email protected]>
#Co-Authored-By: Joel Silberman <[email protected]>
#Co-Authored-By: 4dsherwood <[email protected]>
#Co-Authored-By: Blaise Pabon <[email protected]>
#Co-Authored-By: Michael R. Wolf <[email protected]>
#Co-Authored-By: Idan Melamed <[email protected]>
#Co-Authored-By: Tsvetan Tsvetanov <[email protected]>
#Co-Authored-By: Austin Chadwick <[email protected]>
#Co-Authored-By: Rea <[email protected]>
#Co-Authored-By: David Campey <[email protected]>
#Co-Authored-by: Zac Ball <[email protected]>
#Co-Authored-By: Kitastro <[email protected]>
# Leave the following line alone!!!
CO-AUTHORED-BY
}
function main {
echo # Terminate (likely) incomplete line
echo # Inject blank line
cat_co_authored_by |
grep -v '#' |
grep -v '^[[:space:]]*$'
}
main