Re: [PATCH v2 4/4] git-send-email: improve --validate error output
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 5, 2021, 19:14 UTC
- Message-ID
- <xmqqim505ys0.fsf@gitster.g>
- In-Reply-To
- <patch-4.5-a1edceb4913-20210404T091649Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Improve the output we emit on --validate error to: > > * Say "FILE:LINE" instead of "FILE: LINE".
OK, that is an improvement because it matches "grep -n" hits, compiler error messages, etc., to help the editors to jump to these lines.
> * Don't say "patch contains a" after just mentioning the filename, > just leave it at "FILE:LINE: is longer than[...]. The "contains a" > sounded like we were talking about the file in general, when we're > actually checking it line-by-line.
This, too.
Show 14 quoted lines
> * Don't just say "rejected by sendemail-validate hook", but combine > that with the system_or_msg() output to say what exit code the hook > died with. > > I had an aborted attempt to make the line length checker note all > lines that were longer than the limit. I didn't think that was worth > the effort, but I've left in the testing change to check that we die > as soon as we spot the first long line. > > Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> > --- > git-send-email.perl | 23 ++++++++++------------- > t/t9001-send-email.sh | 17 ++++++++++++----- > 2 files changed, 22 insertions(+), 18 deletions(-)
Will queue. I like the end result, but left a comment about flipping-and-flopping between 2/4 and this step on an extra "validate_patch_error" helper sub.
Thanks.