{"thread":{"id":"40356","subject":"[bug] .git/hooks/commit-msg.sample test is reversed","startedAt":"2015-09-15T08:43:52Z","lastAt":"2015-09-15T09:10:59Z","messageCount":2,"participants":["Federico Fissore","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"269993","messageId":"55F7DA48.30104@fissore.org","threadId":"40356","inReplyTo":null,"subject":"[bug] .git/hooks/commit-msg.sample test is reversed","fromName":"Federico Fissore","fromEmail":"federico@fissore.org","sentAt":"2015-09-15T08:43:52Z","receivedAt":"2015-09-15T08:43:52Z","isPatch":false,"sender":{"key":"federico@fissore.org","avatar":null},"body":"Hello everyone\n\nIn file commit-msg.sample, grep test is reversed. It greps\n'^Signed-off-by: '\nwhile it should grep\n'Signed-off-by: '\n\nIf you run the sample against attached file, it won't complain. Remove \nthe ^ and it will work as expected\n\nRegards\n\nFederico\n\n\n    Commit message\n    \n    Signed-off-by: Me <me@example.com>\n    Signed-off-by: Me <me@example.com>\n\n"},{"id":"269994","messageId":"vpq8u88cajg.fsf@anie.imag.fr","threadId":"40356","inReplyTo":"55F7DA48.30104@fissore.org","subject":"Re: [bug] .git/hooks/commit-msg.sample test is reversed","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2015-09-15T09:10:59Z","receivedAt":"2015-09-15T09:10:59Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Federico Fissore <federico@fissore.org> writes:\n\n> Hello everyone\n>\n> In file commit-msg.sample, grep test is reversed. It greps\n> '^Signed-off-by: '\n> while it should grep\n> 'Signed-off-by: '\n>\n> If you run the sample against attached file, it won't complain. Remove\n> the ^ and it will work as expected\n\nI think the test is correct.\n\nIn grep, ^ can have two meanings:\n\n'^foo' means \"foo at the start of a line\"\n'[^abc]' means \"one character but not a, b or c\"\n\nThe Signed-off-by: trailer is meant to be at the start of a line, hence\nthe ^.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}