From: "Michael S. Tsirkin" <mst@redhat.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Christian Couder <christian.couder@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
git@vger.kernel.org
Subject: [PATCH] builtin/trailers: don't always run all commands
Date: Wed, 6 Apr 2016 22:13:03 +0300 [thread overview]
Message-ID: <1459969922-9131-1-git-send-email-mst@redhat.com> (raw)
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
reply other threads:[~2016-04-06 19:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1459969922-9131-1-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).