git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] diffcore-pickaxe: make error messages more consistent
Date: Mon, 03 Jun 2013 10:52:02 -0700	[thread overview]
Message-ID: <7vwqqbf5fh.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1370002335-6596-2-git-send-email-artagnon@gmail.com> (Ramkumar Ramachandra's message of "Fri, 31 May 2013 17:42:14 +0530")

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> Currently, diffcore-pickaxe reports two distinct errors for the same
> user error:
>
>     $ git log --pickaxe-regex -S'\1'
>     fatal: invalid pickaxe regex: Invalid back reference
>
>     $ git log -G'\1' # --pickaxe-regex is implied
>     fatal: invalid log-grep regex: Invalid back reference
>
> Since the error has nothing to do with "log-grep", change the -G and -S
> error messages to say "invalid regex".

I'll reword the above somewhat; as I repeatedly explained, -G does
*not* imply pickaxe-regex at all.

While -G was being developed, it was internally called log-grep (no
relation to "git log --grep=<pattern>"), and that seeped through to
the error message.  Removing that is a good idea.

Thanks, will queue.



>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  diffcore-pickaxe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
> index 63722f8..c97ac9b 100644
> --- a/diffcore-pickaxe.c
> +++ b/diffcore-pickaxe.c
> @@ -122,7 +122,7 @@ static void diffcore_pickaxe_grep(struct diff_options *o)
>  		char errbuf[1024];
>  		regerror(err, &regex, errbuf, 1024);
>  		regfree(&regex);
> -		die("invalid log-grep regex: %s", errbuf);
> +		die("invalid regex: %s", errbuf);
>  	}
>  
>  	pickaxe(&diff_queued_diff, o, &regex, NULL, diff_grep);
> @@ -246,7 +246,7 @@ static void diffcore_pickaxe_count(struct diff_options *o)
>  			char errbuf[1024];
>  			regerror(err, &regex, errbuf, 1024);
>  			regfree(&regex);
> -			die("invalid pickaxe regex: %s", errbuf);
> +			die("invalid regex: %s", errbuf);
>  		}
>  		regexp = &regex;
>  	} else {

  reply	other threads:[~2013-06-03 17:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 12:12 [PATCH v4 0/2] Improve diffcore-pickaxe documentation Ramkumar Ramachandra
2013-05-31 12:12 ` [PATCH 1/2] diffcore-pickaxe: make error messages more consistent Ramkumar Ramachandra
2013-06-03 17:52   ` Junio C Hamano [this message]
2013-05-31 12:12 ` [PATCH 2/2] diffcore-pickaxe doc: document -S and -G properly Ramkumar Ramachandra
2013-06-03 17:54   ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2013-05-24 10:33 [PATCH v3 0/2] Improve diffcore-pickaxe documentation Ramkumar Ramachandra
2013-05-24 10:33 ` [PATCH 1/2] diffcore-pickaxe: make error messages more consistent Ramkumar Ramachandra
2013-05-17 12:23 [PATCH v2 0/2] Improve diffcore-pickaxe documentation Ramkumar Ramachandra
2013-05-17 12:23 ` [PATCH 1/2] diffcore-pickaxe: make error messages more consistent Ramkumar Ramachandra
2013-05-18  1:25   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vwqqbf5fh.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).