{"thread":{"id":"29009","subject":"[PATCH] revert: do not pass non-literal string as format to git_path()","startedAt":"2011-11-23T12:45:36Z","lastAt":"2011-11-23T17:29:17Z","messageCount":2,"participants":["Nguyễn Thái Ngọc Duy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"179884","messageId":"1322052336-13619-1-git-send-email-pclouds@gmail.com","threadId":"29009","inReplyTo":null,"subject":"[PATCH] revert: do not pass non-literal string as format to git_path()","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-11-23T12:45:36Z","receivedAt":"2011-11-23T12:45:36Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"This fixes the following warning.\n\n    CC builtin/revert.o\nbuiltin/revert.c: In function ‘write_cherry_pick_head’:\nbuiltin/revert.c:311: warning: format not a string literal and no format arguments\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n builtin/revert.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/revert.c b/builtin/revert.c\nindex 0c61668..9b9b2e5 100644\n--- a/builtin/revert.c\n+++ b/builtin/revert.c\n@@ -308,7 +308,7 @@ static void write_cherry_pick_head(struct commit *commit, const char *pseudoref)\n \n \tstrbuf_addf(&buf, \"%s\\n\", sha1_to_hex(commit->object.sha1));\n \n-\tfilename = git_path(pseudoref);\n+\tfilename = git_path(\"%s\", pseudoref);\n \tfd = open(filename, O_WRONLY | O_CREAT, 0666);\n \tif (fd < 0)\n \t\tdie_errno(_(\"Could not open '%s' for writing\"), filename);\n-- \n1.7.4.74.g639db\n"},{"id":"179896","messageId":"7vty5ubvde.fsf@alter.siamese.dyndns.org","threadId":"29009","inReplyTo":"1322052336-13619-1-git-send-email-pclouds@gmail.com","subject":"Re: [PATCH] revert: do not pass non-literal string as format to git_path()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-23T17:29:17Z","receivedAt":"2011-11-23T17:29:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}