Skip to content

Commit aa66c7e

Browse files
author
Junio C Hamano
committed
format-patch/commit: Quote single quote in the author name properly.
Noticed by Kyle McMartin. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 81214e4 commit aa66c7e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

git-commit.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ then
165165
then
166166
pick_author_script='
167167
/^author /{
168+
s/'\''/'\''\\'\'\''/g
168169
h
169170
s/^author \([^<]*\) <[^>]*> .*$/\1/
170171
s/'\''/'\''\'\'\''/g

git-format-patch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ titleScript='
173173

174174
whosepatchScript='
175175
/^author /{
176+
s/'\''/'\''\\'\'\''/g
176177
s/author \(.*>\) \(.*\)$/au='\''\1'\'' ad='\''\2'\''/p
177178
q
178179
}'

0 commit comments

Comments
 (0)