mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
git-coauthor: quote variable in the comparison
This commit is contained in:
parent
eb33c9bf5a
commit
ecff5e1a3c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue