From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH] log -L: improve error message on malformed argument
Date: Thu, 16 Apr 2015 16:43:07 +0200 [thread overview]
Message-ID: <1429195387-20573-1-git-send-email-Matthieu.Moy@imag.fr> (raw)
The old message did not mention the :regex:file form.
To avoid overly long lines, split the message into two lines (in case
item->string is long, it will be the only part truncated in a narrow
terminal).
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
line-log.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/line-log.c b/line-log.c
index a490efe..e725248 100644
--- a/line-log.c
+++ b/line-log.c
@@ -575,7 +575,8 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)
name_part = skip_range_arg(item->string);
if (!name_part || *name_part != ':' || !name_part[1])
- die("-L argument '%s' not of the form start,end:file",
+ die("invalid -L argument '%s'.\n"
+ "It should be of the form start,end:file or :regex:file.",
item->string);
range_part = xstrndup(item->string, name_part - item->string);
name_part++;
--
2.4.0.rc1.42.g9642cc6
next reply other threads:[~2015-04-16 14:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 14:43 Matthieu Moy [this message]
2015-04-16 20:59 ` [PATCH] log -L: improve error message on malformed argument Junio C Hamano
2015-04-16 21:45 ` Junio C Hamano
2015-04-16 21:49 ` Eric Sunshine
2015-04-17 20:38 ` Junio C Hamano
2015-04-19 17:29 ` [PATCH] Documentation: change -L:<regex> to -L:<funcname> Matthieu Moy
2015-04-20 11:31 ` Ramsay Jones
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=1429195387-20573-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).