diff --git a/bin/git-coauthor b/bin/git-coauthor index 522f2db..c51400e 100755 --- a/bin/git-coauthor +++ b/bin/git-coauthor @@ -9,7 +9,7 @@ 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)" -if [[ $old_message == *"Co-authored-by:"* ]]; then +if [[ "$old_message" == *"Co-authored-by:"* ]]; then git commit --amend -m "$old_message Co-authored-by: $coauthor <$email>" else