Fix shell escaping.

* magit.el (magit-escape-for-shell): use literal argument to
replace-regexp-in-string function.
This commit is contained in:
Marcin Bachry 2009-05-17 16:58:37 +02:00 committed by Marius Vollmer
parent 9f9370ce62
commit 7700954ee4

View file

@ -323,7 +323,7 @@ Many Magit faces inherit from this one by default."
prop val))
(defun magit-escape-for-shell (str)
(concat "'" (replace-regexp-in-string "'" "'\\''" str) "'"))
(concat "'" (replace-regexp-in-string "'" "'\\''" str t t) "'"))
(defun magit-format-commit (commit format)
(magit-git-string "log --max-count=1 --pretty=format:%s %s" format commit))