git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] log -L: improve error message on malformed argument
@ 2015-04-16 14:43 Matthieu Moy
  2015-04-16 20:59 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matthieu Moy @ 2015-04-16 14:43 UTC (permalink / raw)
  To: gitster; +Cc: git, Matthieu Moy

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-20 11:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 14:43 [PATCH] log -L: improve error message on malformed argument Matthieu Moy
2015-04-16 20:59 ` 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

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).