mirror of
https://github.com/tj/git-extras.git
synced 2026-09-12 16:36:22 -04:00
Ensure arguments exist
This commit is contained in:
parent
66288296b2
commit
3484df9ca4
|
|
@ -1,4 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
coauthor=$1
|
||||
email=$2
|
||||
|
||||
test -z $coauthor && echo "co-author required." 1>&2 && exit 1
|
||||
test -z $email && echo "co-author email required." 1>&2 && exit 1
|
||||
|
||||
old_message="$(git log --format=%B -n1)"
|
||||
git commit --amend -m "$old_message" -m "Co-authored-by: $1 <$2>"
|
||||
git commit --amend -m "$old_message" -m "Co-authored-by: $coauthor <$email>"
|
||||
|
|
|
|||
Loading…
Reference in a new issue