From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH] rev-list: accept --format without argument
Date: Wed, 28 Jul 2010 11:42:00 +0200 [thread overview]
Message-ID: <1280310120-16852-1-git-send-email-Matthieu.Moy@imag.fr> (raw)
The documentation says the syntax is --format[='<format>'], match it in
the implementation.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Not that it's terribly usefull, but better be consistant ...
revision.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index 33fa0b5..4b64757 100644
--- a/revision.c
+++ b/revision.c
@@ -1300,10 +1300,10 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->combine_merges = 1;
} else if (!strcmp(arg, "-v")) {
revs->verbose_header = 1;
- } else if (!strcmp(arg, "--pretty")) {
+ } else if (!strcmp(arg, "--pretty") || !strcmp(arg, "--format")) {
revs->verbose_header = 1;
revs->pretty_given = 1;
- get_commit_format(arg+8, revs);
+ get_commit_format("", revs);
} else if (!prefixcmp(arg, "--pretty=") || !prefixcmp(arg, "--format=")) {
/*
* Detached form ("--pretty X" as opposed to "--pretty=X")
--
1.7.2.25.g9ebe3
next reply other threads:[~2010-07-28 9:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 9:42 Matthieu Moy [this message]
2010-07-28 16:04 ` [PATCH] rev-list: accept --format without argument Junio C Hamano
2010-07-28 16:29 ` Matthieu Moy
2010-08-04 7:39 ` Matthieu Moy
2010-08-04 18:14 ` Junio C Hamano
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=1280310120-16852-1-git-send-email-Matthieu.Moy@imag.fr \
--to=matthieu.moy@imag.fr \
--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).