{"thread":{"id":"39095","subject":"[PATCH] log -L: improve error message on malformed argument","startedAt":"2015-04-16T14:43:07Z","lastAt":"2015-04-20T11:31:42Z","messageCount":7,"participants":["Matthieu Moy","Junio C Hamano","Eric Sunshine","Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"259498","messageId":"1429195387-20573-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"39095","inReplyTo":null,"subject":"[PATCH] log -L: improve error message on malformed argument","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2015-04-16T14:43:07Z","receivedAt":"2015-04-16T14:43:07Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"The old message did not mention the :regex:file form.\n\nTo avoid overly long lines, split the message into two lines (in case\nitem->string is long, it will be the only part truncated in a narrow\nterminal).\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n line-log.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/line-log.c b/line-log.c\nindex a490efe..e725248 100644\n--- a/line-log.c\n+++ b/line-log.c\n@@ -575,7 +575,8 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)\n \n \t\tname_part = skip_range_arg(item->string);\n \t\tif (!name_part || *name_part != ':' || !name_part[1])\n-\t\t\tdie(\"-L argument '%s' not of the form start,end:file\",\n+\t\t\tdie(\"invalid -L argument '%s'.\\n\"\n+\t\t\t    \"It should be of the form start,end:file or :regex:file.\",\n \t\t\t    item->string);\n \t\trange_part = xstrndup(item->string, name_part - item->string);\n \t\tname_part++;\n-- \n2.4.0.rc1.42.g9642cc6\n"},{"id":"259541","messageId":"xmqqzj67hjs5.fsf@gitster.dls.corp.google.com","threadId":"39095","inReplyTo":"1429195387-20573-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH] log -L: improve error message on malformed argument","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-04-16T20:59:06Z","receivedAt":"2015-04-16T20:59:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n\n> The old message did not mention the :regex:file form.\n>\n> To avoid overly long lines, split the message into two lines (in case\n> item->string is long, it will be the only part truncated in a narrow\n> terminal).\n>\n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n>  line-log.c | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/line-log.c b/line-log.c\n> index a490efe..e725248 100644\n> --- a/line-log.c\n> +++ b/line-log.c\n> @@ -575,7 +575,8 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)\n>  \n>  \t\tname_part = skip_range_arg(item->string);\n>  \t\tif (!name_part || *name_part != ':' || !name_part[1])\n> -\t\t\tdie(\"-L argument '%s' not of the form start,end:file\",\n> +\t\t\tdie(\"invalid -L argument '%s'.\\n\"\n> +\t\t\t    \"It should be of the form start,end:file or :regex:file.\",\n>  \t\t\t    item->string);\n>  \t\trange_part = xstrndup(item->string, name_part - item->string);\n>  \t\tname_part++;\n\nHmm.\n\nWhile I understand and even agree with the reasoning behind chomping\nthe line after a potentially long user-supplied argument, it\nsomewhat bothers me that the output of subsequent lines would begin\nwithout the prefix.\n\nDo we have any other multi-line die/error/warning message?\n\nI am tempted to suggest doing something along the lines of the\nattached, if we were to start using multi-line die/error/warning\nlike this one.  Obviously we would need something similar on the\nvwritef() side as well.\n\n usage.c | 23 ++++++++++++++++++++---\n 1 file changed, 20 insertions(+), 3 deletions(-)\n\ndiff --git a/usage.c b/usage.c\nindex ed14645..09710fa 100644\n--- a/usage.c\n+++ b/usage.c\n@@ -8,9 +8,26 @@\n \n void vreportf(const char *prefix, const char *err, va_list params)\n {\n-\tchar msg[4096];\n-\tvsnprintf(msg, sizeof(msg), err, params);\n-\tfprintf(stderr, \"%s%s\\n\", prefix, msg);\n+\tchar msg[4096], *bol;\n+\tint len;\n+\n+\tlen = vsnprintf(msg, sizeof(msg), err, params);\n+\tif (sizeof(msg) < len)\n+\t\tlen = sizeof(msg);\n+\tbol = msg;\n+\twhile (1) {\n+\t\tint linelen;\n+\t\tchar *eol = memchr(bol, '\\n', len);\n+\t\tif (!eol)\n+\t\t\tlinelen = len;\n+\t\telse\n+\t\t\tlinelen = eol - bol;\n+\t\tfprintf(stderr, \"%s%.*s\\n\", prefix, linelen, bol);\n+\t\tif (!eol)\n+\t\t\tbreak;\n+\t\tbol = eol + 1;\n+\t\tlen -= linelen + 1;\n+\t}\n }\n \n void vwritef(int fd, const char *prefix, const char *err, va_list params)\n"},{"id":"259543","messageId":"xmqqpp73hhnm.fsf@gitster.dls.corp.google.com","threadId":"39095","inReplyTo":"1429195387-20573-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH] log -L: improve error message on malformed argument","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-04-16T21:45:01Z","receivedAt":"2015-04-16T21:45:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n\n> The old message did not mention the :regex:file form.\n>\n> To avoid overly long lines, split the message into two lines (in case\n> item->string is long, it will be the only part truncated in a narrow\n> terminal).\n>\n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n>  line-log.c | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/line-log.c b/line-log.c\n> index a490efe..e725248 100644\n> --- a/line-log.c\n> +++ b/line-log.c\n> @@ -575,7 +575,8 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)\n>  \n>  \t\tname_part = skip_range_arg(item->string);\n>  \t\tif (!name_part || *name_part != ':' || !name_part[1])\n> -\t\t\tdie(\"-L argument '%s' not of the form start,end:file\",\n> +\t\t\tdie(\"invalid -L argument '%s'.\\n\"\n> +\t\t\t    \"It should be of the form start,end:file or :regex:file.\",\n>  \t\t\t    item->string);\n>  \t\trange_part = xstrndup(item->string, name_part - item->string);\n>  \t\tname_part++;\n\nYou forgot to update tests to match their expectations?  4211.20\nwants to see 'argument.*not of the form', it seems.\n"},{"id":"259544","messageId":"CAPig+cRqJdi6skbszkwFFauqh4qWJDxMq5GdcFuKrJj9wtBvoQ@mail.gmail.com","threadId":"39095","inReplyTo":"xmqqpp73hhnm.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] log -L: improve error message on malformed argument","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-04-16T21:49:24Z","receivedAt":"2015-04-16T21:49:24Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Apr 16, 2015 at 5:45 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n>\n>> The old message did not mention the :regex:file form.\n>>\n>> To avoid overly long lines, split the message into two lines (in case\n>> item->string is long, it will be the only part truncated in a narrow\n>> terminal).\n>>\n>> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n>> ---\n>>  line-log.c | 3 ++-\n>>  1 file changed, 2 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/line-log.c b/line-log.c\n>> index a490efe..e725248 100644\n>> --- a/line-log.c\n>> +++ b/line-log.c\n>> @@ -575,7 +575,8 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)\n>>\n>>               name_part = skip_range_arg(item->string);\n>>               if (!name_part || *name_part != ':' || !name_part[1])\n>> -                     die(\"-L argument '%s' not of the form start,end:file\",\n>> +                     die(\"invalid -L argument '%s'.\\n\"\n>> +                         \"It should be of the form start,end:file or :regex:file.\",\n>>                           item->string);\n>>               range_part = xstrndup(item->string, name_part - item->string);\n>>               name_part++;\n>\n> You forgot to update tests to match their expectations?  4211.20\n> wants to see 'argument.*not of the form', it seems.\n\nAn alternate wording might be:\n\n    \"-L argument not 'start,end:file' or ':regex:file': %s\"\n\nThis can still wrap onscreen but the important information (the two\nforms accepted by -L) is at the head of the error message, and the\nvariable (user-supplied) bit is at the end after the colon, in typical\nerror message form.\n"},{"id":"259594","messageId":"xmqqh9sepk20.fsf@gitster.dls.corp.google.com","threadId":"39095","inReplyTo":"1429195387-20573-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH] log -L: improve error message on malformed argument","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-04-17T20:38:15Z","receivedAt":"2015-04-17T20:38:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n\n> The old message did not mention the :regex:file form.\n>\n> To avoid overly long lines, split the message into two lines (in case\n> item->string is long, it will be the only part truncated in a narrow\n> terminal).\n>\n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n>  line-log.c | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/line-log.c b/line-log.c\n> index a490efe..e725248 100644\n> --- a/line-log.c\n> +++ b/line-log.c\n> @@ -575,7 +575,8 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)\n>  \n>  \t\tname_part = skip_range_arg(item->string);\n>  \t\tif (!name_part || *name_part != ':' || !name_part[1])\n> -\t\t\tdie(\"-L argument '%s' not of the form start,end:file\",\n> +\t\t\tdie(\"invalid -L argument '%s'.\\n\"\n> +\t\t\t    \"It should be of the form start,end:file or :regex:file.\",\n>  \t\t\t    item->string);\n>  \t\trange_part = xstrndup(item->string, name_part - item->string);\n>  \t\tname_part++;\n\nI actually think \"start,end:file\" is more correct than your updated\ntext.\n\nBy adding :regex:file as a possibility, you are hinting that 'start'\nand 'end' are *not* regular expressions but numbers, but\n\n    $ git log -L'/^int main/,/^}/:git.c'\n\nis a perfectly fine way to specify start (i.e. the first line that\nmatches '^int main') and end (i.e. the first line that matches '^}'\nafter that).  Perhaps rephrase it as :funcname:file to avoid giving\nfalse impression to the other one, and use Eric's suggestion on top?\n\n    die(\"-L argument not 'start,end:file' or ':funcname:file': %s\",\n\titem->string);\n\nWith the matching update to tests, here is what I'll queue on top of\nthis patch for now, but please send in objections and improvements.\n\nThanks.\n\n line-log.c          | 3 +--\n t/t4211-line-log.sh | 8 ++++----\n 2 files changed, 5 insertions(+), 6 deletions(-)\n\ndiff --git a/line-log.c b/line-log.c\nindex 5d4cb7c..51d9f7c 100644\n--- a/line-log.c\n+++ b/line-log.c\n@@ -543,8 +543,7 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)\n \n \t\tname_part = skip_range_arg(item->string);\n \t\tif (!name_part || *name_part != ':' || !name_part[1])\n-\t\t\tdie(\"invalid -L argument '%s'.\\n\"\n-\t\t\t    \"It should be of the form start,end:file or :regex:file.\",\n+\t\t\tdie(\"-L argument not 'start,end:file' or ':funcname:file': %s\",\n \t\t\t    item->string);\n \t\trange_part = xstrndup(item->string, name_part - item->string);\n \t\tname_part++;\ndiff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh\nindex 426a828..edd5ed3 100755\n--- a/t/t4211-line-log.sh\n+++ b/t/t4211-line-log.sh\n@@ -40,14 +40,14 @@ canned_test \"-L 24,+1:a.c simple\" vanishes-early\n canned_test \"-L '/long f/,/^}/:b.c' move-support\" move-support-f\n \n test_bad_opts \"-L\" \"switch.*requires a value\"\n-test_bad_opts \"-L b.c\" \"argument.*not of the form\"\n-test_bad_opts \"-L 1:\" \"argument.*not of the form\"\n+test_bad_opts \"-L b.c\" \"argument not .start,end:file\"\n+test_bad_opts \"-L 1:\" \"argument not .start,end:file\"\n test_bad_opts \"-L 1:nonexistent\" \"There is no path\"\n test_bad_opts \"-L 1:simple\" \"There is no path\"\n-test_bad_opts \"-L '/foo:b.c'\" \"argument.*not of the form\"\n+test_bad_opts \"-L '/foo:b.c'\" \"argument not .start,end:file\"\n test_bad_opts \"-L 1000:b.c\" \"has only.*lines\"\n test_bad_opts \"-L 1,1000:b.c\" \"has only.*lines\"\n-test_bad_opts \"-L :b.c\" \"argument.*not of the form\"\n+test_bad_opts \"-L :b.c\" \"argument not .start,end:file\"\n test_bad_opts \"-L :foo:b.c\" \"no match\"\n \n test_done\n-- \n2.4.0-rc2-183-g70401ab\n"},{"id":"259649","messageId":"1429464595-11563-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"39095","inReplyTo":"xmqqh9sepk20.fsf@gitster.dls.corp.google.com","subject":"[PATCH] Documentation: change -L:<regex> to -L:<funcname>","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2015-04-19T17:29:55Z","receivedAt":"2015-04-19T17:29:55Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"The old wording was somehow implying that <start> and <end> were not\nregular expressions. Also, the common case is to use a plain function\nname here so <funcname> makes sense (the fact that it is a regular\nexpression is documented in line-range-format.txt).\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\nJunio C Hamano <gitster@pobox.com> writes:\n\n> By adding :regex:file as a possibility, you are hinting that 'start'\n> and 'end' are *not* regular expressions but numbers, but\n>\n>     $ git log -L'/^int main/,/^}/:git.c'\n>\n> is a perfectly fine way to specify start (i.e. the first line that\n> matches '^int main') and end (i.e. the first line that matches '^}'\n> after that).\n\nOK, but the same argument applies to the documentation (where I\ncut-and-pasted from actually). So I suggest this patch in addition\n(I'd apply it right before the patch on the code).\n\n> false impression to the other one, and use Eric's suggestion on top?\n>\n>     die(\"-L argument not 'start,end:file' or ':funcname:file': %s\",\n> \titem->string);\n>\n> With the matching update to tests, here is what I'll queue on top of\n> this patch for now, but please send in objections and improvements.\n\nVery good.\n\nLet me know if you want me to resend the 2-patch series.\n\n Documentation/blame-options.txt     |  2 +-\n Documentation/git-log.txt           |  2 +-\n Documentation/gitk.txt              |  4 ++--\n Documentation/line-range-format.txt | 11 ++++++-----\n 4 files changed, 10 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt\nindex b299b59..a09969b 100644\n--- a/Documentation/blame-options.txt\n+++ b/Documentation/blame-options.txt\n@@ -10,7 +10,7 @@\n \tInclude additional statistics at the end of blame output.\n \n -L <start>,<end>::\n--L :<regex>::\n+-L :<funcname>::\n \tAnnotate only the given line range. May be specified multiple times.\n \tOverlapping ranges are allowed.\n +\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex 18bc716..f0ec283 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -62,7 +62,7 @@ produced by `--stat`, etc.\n \toutput by allowing them to allocate space in advance.\n \n -L <start>,<end>:<file>::\n--L :<regex>:<file>::\n+-L :<funcname>:<file>::\n \tTrace the evolution of the line range given by \"<start>,<end>\"\n \t(or the funcname regex <regex>) within the <file>.  You may\n \tnot give any pathspec limiters.  This is currently limited to\ndiff --git a/Documentation/gitk.txt b/Documentation/gitk.txt\nindex 7ae50aa..d3b91ca 100644\n--- a/Documentation/gitk.txt\n+++ b/Documentation/gitk.txt\n@@ -99,10 +99,10 @@ linkgit:git-rev-list[1] for a complete list.\n \tdetailed explanation.)\n \n -L<start>,<end>:<file>::\n--L:<regex>:<file>::\n+-L:<funcname>:<file>::\n \n \tTrace the evolution of the line range given by \"<start>,<end>\"\n-\t(or the funcname regex <regex>) within the <file>.  You may\n+\t(or the funcname regex <funcname>) within the <file>.  You may\n \tnot give any pathspec limiters.  This is currently limited to\n \ta walk starting from a single revision, i.e., you may only\n \tgive zero or one positive revision arguments.\ndiff --git a/Documentation/line-range-format.txt b/Documentation/line-range-format.txt\nindex d7f2603..829676f 100644\n--- a/Documentation/line-range-format.txt\n+++ b/Documentation/line-range-format.txt\n@@ -22,8 +22,9 @@ This is only valid for <end> and will specify a number\n of lines before or after the line given by <start>.\n \n +\n-If ``:<regex>'' is given in place of <start> and <end>, it denotes the range\n-from the first funcname line that matches <regex>, up to the next\n-funcname line. ``:<regex>'' searches from the end of the previous `-L` range,\n-if any, otherwise from the start of file.\n-``^:<regex>'' searches from the start of file.\n+If ``:<funcname>'' is given in place of <start> and <end>, it is a\n+regular expression that denotes the range from the first funcname line\n+that matches <funcname>, up to the next funcname line. ``:<funcname>''\n+searches from the end of the previous `-L` range, if any, otherwise\n+from the start of file. ``^:<funcname>'' searches from the start of\n+file.\n-- \n2.4.0.rc1.42.g9642cc6\n"},{"id":"259671","messageId":"5534E39E.30305@ramsay1.demon.co.uk","threadId":"39095","inReplyTo":"1429464595-11563-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH] Documentation: change -L:<regex> to -L:<funcname>","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2015-04-20T11:31:42Z","receivedAt":"2015-04-20T11:31:42Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"On 19/04/15 18:29, Matthieu Moy wrote:\n> The old wording was somehow implying that <start> and <end> were not\n> regular expressions. Also, the common case is to use a plain function\n> name here so <funcname> makes sense (the fact that it is a regular\n> expression is documented in line-range-format.txt).\n> \n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n>> By adding :regex:file as a possibility, you are hinting that 'start'\n>> and 'end' are *not* regular expressions but numbers, but\n>>\n>>     $ git log -L'/^int main/,/^}/:git.c'\n>>\n>> is a perfectly fine way to specify start (i.e. the first line that\n>> matches '^int main') and end (i.e. the first line that matches '^}'\n>> after that).\n> \n> OK, but the same argument applies to the documentation (where I\n> cut-and-pasted from actually). So I suggest this patch in addition\n> (I'd apply it right before the patch on the code).\n> \n>> false impression to the other one, and use Eric's suggestion on top?\n>>\n>>     die(\"-L argument not 'start,end:file' or ':funcname:file': %s\",\n>> \titem->string);\n>>\n>> With the matching update to tests, here is what I'll queue on top of\n>> this patch for now, but please send in objections and improvements.\n> \n> Very good.\n> \n> Let me know if you want me to resend the 2-patch series.\n> \n>  Documentation/blame-options.txt     |  2 +-\n>  Documentation/git-log.txt           |  2 +-\n>  Documentation/gitk.txt              |  4 ++--\n>  Documentation/line-range-format.txt | 11 ++++++-----\n>  4 files changed, 10 insertions(+), 9 deletions(-)\n> \n> diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt\n> index b299b59..a09969b 100644\n> --- a/Documentation/blame-options.txt\n> +++ b/Documentation/blame-options.txt\n> @@ -10,7 +10,7 @@\n>  \tInclude additional statistics at the end of blame output.\n>  \n>  -L <start>,<end>::\n> --L :<regex>::\n> +-L :<funcname>::\n>  \tAnnotate only the given line range. May be specified multiple times.\n>  \tOverlapping ranges are allowed.\n>  +\n> diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\n> index 18bc716..f0ec283 100644\n> --- a/Documentation/git-log.txt\n> +++ b/Documentation/git-log.txt\n> @@ -62,7 +62,7 @@ produced by `--stat`, etc.\n>  \toutput by allowing them to allocate space in advance.\n>  \n>  -L <start>,<end>:<file>::\n> --L :<regex>:<file>::\n> +-L :<funcname>:<file>::\n>  \tTrace the evolution of the line range given by \"<start>,<end>\"\n>  \t(or the funcname regex <regex>) within the <file>.  You may\n\nperhaps this should read the same as the hunk below, namely:\n        (or the funcname regex <funcname>) ...\n\n[I haven't actually given it any thought, I just noticed the difference ...]\n\nThanks!\n\nATB,\nRamsay Jones\n\n>  \tnot give any pathspec limiters.  This is currently limited to\n> diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt\n> index 7ae50aa..d3b91ca 100644\n> --- a/Documentation/gitk.txt\n> +++ b/Documentation/gitk.txt\n> @@ -99,10 +99,10 @@ linkgit:git-rev-list[1] for a complete list.\n>  \tdetailed explanation.)\n>  \n>  -L<start>,<end>:<file>::\n> --L:<regex>:<file>::\n> +-L:<funcname>:<file>::\n>  \n>  \tTrace the evolution of the line range given by \"<start>,<end>\"\n> -\t(or the funcname regex <regex>) within the <file>.  You may\n> +\t(or the funcname regex <funcname>) within the <file>.  You may\n>  \tnot give any pathspec limiters.  This is currently limited to\n>  \ta walk starting from a single revision, i.e., you may only\n>  \tgive zero or one positive revision arguments.\n> diff --git a/Documentation/line-range-format.txt b/Documentation/line-range-format.txt\n> index d7f2603..829676f 100644\n> --- a/Documentation/line-range-format.txt\n> +++ b/Documentation/line-range-format.txt\n> @@ -22,8 +22,9 @@ This is only valid for <end> and will specify a number\n>  of lines before or after the line given by <start>.\n>  \n>  +\n> -If ``:<regex>'' is given in place of <start> and <end>, it denotes the range\n> -from the first funcname line that matches <regex>, up to the next\n> -funcname line. ``:<regex>'' searches from the end of the previous `-L` range,\n> -if any, otherwise from the start of file.\n> -``^:<regex>'' searches from the start of file.\n> +If ``:<funcname>'' is given in place of <start> and <end>, it is a\n> +regular expression that denotes the range from the first funcname line\n> +that matches <funcname>, up to the next funcname line. ``:<funcname>''\n> +searches from the end of the previous `-L` range, if any, otherwise\n> +from the start of file. ``^:<funcname>'' searches from the start of\n> +file.\n> \n"}]}