git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] builtin/trailers: don't always run all commands

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
Apr 6, 2016, 19:13 UTC
Message-ID
<1459969922-9131-1-git-send-email-mst@redhat.com>

If an explicit -t trailer is used, only parse trailers from command line.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 trailer.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/trailer.c b/trailer.c
index 8e5be91..34654fc 100644
--- a/trailer.c
+++ b/trailer.c
@@ -676,10 +676,14 @@ static struct trailer_item *process_command_line_args(struct string_list *traile
 	struct trailer_item *item;
 
 	/* Add a trailer item for each configured trailer with a command */
-	for (item = first_conf_item; item; item = item->next) {
-		if (item->conf.command) {
-			struct trailer_item *new = new_trailer_item(item, NULL, NULL);
-			add_trailer_item(&arg_tok_first, &arg_tok_last, new);
+	if (!trailers->nr) {
+		for (item = first_conf_item; item; item = item->next) {
+			if (item->conf.command) {
+				struct trailer_item *new =
+					new_trailer_item(item, NULL, NULL);
+				add_trailer_item(&arg_tok_first,
+						 &arg_tok_last, new);
+			}
 		}
 	}
 
-- 
MST
Message 1 of 1 in “builtin/trailers: don't always run all commands”
  1. builtin/trailers: don't always run all commandsMichael S. Tsirkin, Apr 6, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.