git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC Outreachy] Teach ci/check-whitespace to flag incomplete lines as an error
@ 2025-10-11 14:24 Bello Caleb Olamide
  2025-10-11 19:50 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Bello Caleb Olamide @ 2025-10-11 14:24 UTC (permalink / raw)
  To: git; +Cc: gitster, christian.couder, usmanakinyemi202

Hello,

While going through the mailing list for some #leftoverbits, I stumbled on this converation.
https://public-inbox.org/git/xmqqikla86id.fsf@gitster.g/.

After studying the check-whitespace script, I observed that the script parses each line of the output
of the command `git log --check --pretty=format:"---% h% s" "${baseCommit}"..` and formats the result.

But the output of the git command itself does not flag '\no newline at end of file'
as it is shown in git diff, in a case where the files does not contain a newline at the end of the file.

One approach I propose to take is to check the each file changed in each commit and
check if it has the \n as the last character.

Please, will this be good for a microproject and also I'll appreciate suggestions for the approach.
Thank you.

Bello

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

end of thread, other threads:[~2025-10-13 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-11 14:24 [RFC Outreachy] Teach ci/check-whitespace to flag incomplete lines as an error Bello Caleb Olamide
2025-10-11 19:50 ` Junio C Hamano
2025-10-12 23:41   ` Bello Olamide
2025-10-13 15:41     ` Junio C Hamano

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 NNTP newsgroup(s).