{"thread":{"id":"41946","subject":"[PATCH] builtin/trailers: don't always run all commands","startedAt":"2016-04-06T19:13:03Z","lastAt":"2016-04-06T19:13:03Z","messageCount":1,"participants":["Michael S. Tsirkin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"282785","messageId":"1459969922-9131-1-git-send-email-mst@redhat.com","threadId":"41946","inReplyTo":null,"subject":"[PATCH] builtin/trailers: don't always run all commands","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2016-04-06T19:13:03Z","receivedAt":"2016-04-06T19:13:03Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"If an explicit -t trailer is used, only parse\ntrailers from command line.\n\nSigned-off-by: Michael S. Tsirkin <mst@redhat.com>\n---\n trailer.c | 12 ++++++++----\n 1 file changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/trailer.c b/trailer.c\nindex 8e5be91..34654fc 100644\n--- a/trailer.c\n+++ b/trailer.c\n@@ -676,10 +676,14 @@ static struct trailer_item *process_command_line_args(struct string_list *traile\n \tstruct trailer_item *item;\n \n \t/* Add a trailer item for each configured trailer with a command */\n-\tfor (item = first_conf_item; item; item = item->next) {\n-\t\tif (item->conf.command) {\n-\t\t\tstruct trailer_item *new = new_trailer_item(item, NULL, NULL);\n-\t\t\tadd_trailer_item(&arg_tok_first, &arg_tok_last, new);\n+\tif (!trailers->nr) {\n+\t\tfor (item = first_conf_item; item; item = item->next) {\n+\t\t\tif (item->conf.command) {\n+\t\t\t\tstruct trailer_item *new =\n+\t\t\t\t\tnew_trailer_item(item, NULL, NULL);\n+\t\t\t\tadd_trailer_item(&arg_tok_first,\n+\t\t\t\t\t\t &arg_tok_last, new);\n+\t\t\t}\n \t\t}\n \t}\n \n-- \nMST\n"}]}