{"thread":{"id":"7049","subject":"[PATCH] Fix quoting in update hook template","startedAt":"2007-03-02T12:20:10Z","lastAt":"2007-03-02T12:20:10Z","messageCount":1,"participants":["Gerrit Pape"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"36082","messageId":"20070302122010.5110.qmail@fa54d807064c75.315fe32.mid.smarden.org","threadId":"7049","inReplyTo":null,"subject":"[PATCH] Fix quoting in update hook template","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-03-02T12:20:10Z","receivedAt":"2007-03-02T12:20:10Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"By default allowunannotated is unset in the repo config, hence\n$allowunannotated is empty, and must be quoted to not break the syntax.\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n templates/hooks--update |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/templates/hooks--update b/templates/hooks--update\nindex fd1f73d..170a4de 100644\n--- a/templates/hooks--update\n+++ b/templates/hooks--update\n@@ -64,7 +64,7 @@ case \"$refname\",\"$newrev_type\" in\n \t\t# un-annotated tag\n \t\trefname_type=\"tag\"\n \t\tshort_refname=${refname##refs/tags/}\n-\t\tif [ $allowunannotated != \"true\" ]; then\n+\t\tif [ \"$allowunannotated\" != \"true\" ]; then\n \t\t\techo \"*** The un-annotated tag, $short_refname is not allowed in this repository\" >&2\n \t\t\techo \"*** Use 'git tag [ -a | -s ]' for tags you want to propagate.\" >&2\n \t\t\texit 1\n-- \n1.5.0.1\n"}]}