awk -vid="$1" -vtype="$2" '$1 == id {
match($0, /^[^=]*=\s*([^<]*)<([^>]*)>/, a);
name = gensub(/\s+$/, "", "g", a[1]);
+ name = gensub(/^"/, "", "g", name);
+ name = gensub(/"$/, "", "g", name);
+ name = gensub(/'\''/, "'\''\\\\'\'''\''", "g", name);
email = a[2];
print "export GIT_"type"_NAME='\''" name "'\'';"
print "export GIT_"type"_EMAIL='\''" email "'\'';"
exit 1
fi
git filter-branch \
- --env-filter ". ${tmp};"' \
- eval `decode "${GIT_AUTHOR_NAME}" AUTHOR`; \
- eval `decode "${GIT_COMMITTER_NAME}" COMMITTER`; \
+ --env-filter ". '${tmp}';"' \
+ eval "$(decode "${GIT_AUTHOR_NAME}" AUTHOR)"; \
+ eval "$(decode "${GIT_COMMITTER_NAME}" COMMITTER)"; \
' "$@"