diff options
author | Guido Guenther <agx@sigxcpu.org> | 2008-06-16 13:41:56 +0200 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2008-06-16 13:41:56 +0200 |
commit | 063fab51b5f08cb42b3fa03241c434ed90a2d336 (patch) | |
tree | 38e0bd170f0a3900795e452a938f4cd363022bf0 | |
parent | 6008c37c20674e922811ab83b68ccac0a87bd834 (diff) |
escape $s in commit messages
so variable names like $remote_fs don't get dropped silently.
Closes: #486447
-rwxr-xr-x | git-dch | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -40,9 +40,13 @@ def system(cmd): raise GbpError +def escape_commit(msg): + return msg.replace('"','\\\"').replace("$","\$") + + def add_changelog_entry(msg, author, email): "add aa single changelog entry" - cmd = """DEBFULLNAME="%s" DEBEMAIL="%s" dch --no-auto-nmu --append -- "%s" """ % (author, email, msg.replace('"','\\\"')) + cmd = """DEBFULLNAME="%s" DEBEMAIL="%s" dch --no-auto-nmu --append -- "%s" """ % (author, email, escape_commit(msg)) system(cmd) |