aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-git-receiver/shell-command-parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-21 23:12:05 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-21 23:12:05 +0100
commitb9ec274bed571db9c705b65bb8c0bb6409c34fc4 (patch)
treec5c4a8f5e5dd906772916fea1084659dc725d5f9 /src/blogc-git-receiver/shell-command-parser.c
parent209ea0657b7970b4b8069ce44b43eecb97681892 (diff)
downloadblogc-b9ec274bed571db9c705b65bb8c0bb6409c34fc4.tar.gz
blogc-b9ec274bed571db9c705b65bb8c0bb6409c34fc4.tar.bz2
blogc-b9ec274bed571db9c705b65bb8c0bb6409c34fc4.zip
git-receiver: moved shell quote function to common
Diffstat (limited to 'src/blogc-git-receiver/shell-command-parser.c')
-rw-r--r--src/blogc-git-receiver/shell-command-parser.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/blogc-git-receiver/shell-command-parser.c b/src/blogc-git-receiver/shell-command-parser.c
index 0c867b8..4cfdec8 100644
--- a/src/blogc-git-receiver/shell-command-parser.c
+++ b/src/blogc-git-receiver/shell-command-parser.c
@@ -99,28 +99,3 @@ error:
bc_string_free(rv, true);
return NULL;
}
-
-
-char*
-bgr_shell_quote(const char *command)
-{
- // this does not really belongs here, but function is very small
- bc_string_t *rv = bc_string_new();
- bc_string_append_c(rv, '\'');
- if (command != NULL) {
- for (size_t i = 0; i < strlen(command); i++) {
- switch (command[i]) {
- case '!':
- bc_string_append(rv, "'\\!'");
- break;
- case '\'':
- bc_string_append(rv, "'\\''");
- break;
- default:
- bc_string_append_c(rv, command[i]);
- }
- }
- }
- bc_string_append_c(rv, '\'');
- return bc_string_free(rv, false);
-}