Re: [PATCH 1/2] diffcore-pickaxe: make error messages more consistent
Ramkumar Ramachandra artag...@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 artag...@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 { -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] diffcore-pickaxe: make error messages more consistent
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. Signed-off-by: Ramkumar Ramachandra artag...@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 { -- 1.8.3.114.gcd03571 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] diffcore-pickaxe: make error messages more consistent
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. Signed-off-by: Ramkumar Ramachandra artag...@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 { -- 1.8.3.rc3.17.gd95ec6c.dirty -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] diffcore-pickaxe: make error messages more consistent
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 artag...@gmail.com --- 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.1.2.432.g070c57d -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] diffcore-pickaxe: make error messages more consistent
As I already said, I think calling this as pickaxe-regex is wrong (invalid regex is fine, though). More on this in the review for [2/2]. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html