Git development
 help / color / mirror / Atom feed
* [PATCH] diffcore-pickaxe: make error messages more consistent
@ 2013-05-14 14:16 Ramkumar Ramachandra
  2013-05-14 17:46 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Ramkumar Ramachandra @ 2013-05-14 14:16 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano

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 error
message to match the -S error message.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 Sorry I couldn't do more.  diffcore-pickaxe.c isn't at all easy to
 hack on, because there are so few tests guarding it.

 diffcore-pickaxe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index 63722f8..d69a7a2 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 pickaxe regex: %s", errbuf);
 	}
 
 	pickaxe(&diff_queued_diff, o, &regex, NULL, diff_grep);
-- 
1.8.3.rc1.61.g2cacfff

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

end of thread, other threads:[~2013-05-14 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 14:16 [PATCH] diffcore-pickaxe: make error messages more consistent Ramkumar Ramachandra
2013-05-14 17:46 ` Junio C Hamano
2013-05-14 18:15   ` Ramkumar Ramachandra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox