git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Mark trailing whitespace error in del lines of diff

From
CBChristian Brabandt <cblists@256bit.org>
Date
May 26, 2015, 16:31 UTC
Message-ID
<20150526163108.GB24439@256bit.org>
In-Reply-To
<xmqq617g9oer.fsf@gitster.dls.corp.google.com>
Hi Junio!
On Mo, 25 Mai 2015, Junio C Hamano wrote:
Show 28 quoted lines
> Christian Brabandt <cblists@256bit.org>, Christian Brabandt
> <cb@256bit.org> writes:
> 
> > As far as I can see, this does not break any tests and also the 
> > behaviour of git-diff --check does not change. 
> 
> Even if this change introduced a bug that changed the behaviour
> (e.g. say, exited with failure status code when only preimage had
> errors), I wouldn't be surprised if no existing test caught such a
> breakage.  Because the existing tests were written with the
> assumption that the code to check whitespace breakages would never
> look at preimage, it is plausible that no preimage line used in the
> test has any whitespace error in the first place.
> 
> In other words, you'd need to add new tests that change preimage
> lines with various kinds of whitespace errors into postimage lines
> with and without whitespace errors, and run "diff" with various
> combinations of the existing set of core.whitespace values as well
> as your new one.
> 
> But as I said in the other message, I think that the approach this
> patch takes goes in a wrong direction.  Instead of adding a single
> "check and highlight this and only kind of breakage on preimage"
> option as a new kind to existing "what kind of use of whitespaces
> are errors" set, it would be more sensible to add a single "check
> and highlight breakages on preimage lines as well" option that is
> orthogonal to the existing ones that specify "what kind of use of
> whitespaces are errors".
Oh well, too bad. It sounded like a good idea...

Best, Christian

-- 
Unser Gefühl für Natur gleicht der Empfindung des Kranken für die
Gesundheit.
		-- Friedrich Johann Christoph Schiller
Previous: Junio C HamanoNext: Junio C Hamano
Message 29 of 30 in “Mark trailing whitespace error in del lines of diff”
  1. Christian BrabandtMay 25, 2015
  2. brian m. carlsonMay 25, 2015
  3. Junio C HamanoMay 25, 2015
  4. brian m. carlsonMay 25, 2015
  5. Christian BrabandtMay 26, 2015
  6. Junio C HamanoMay 26, 2015
  7. Junio C HamanoMay 26, 2015
  8. Christian BrabandtMay 26, 2015
  9. Junio C HamanoMay 26, 2015
  10. Christian BrabandtMay 26, 2015
  11. 0/5 showing existing ws breakageJunio C Hamano, May 26, 2015
  12. 1/4 t4015: modernise styleJunio C Hamano, May 26, 2015
  13. 2/4 t4015: separate common setup and per-test expectationJunio C Hamano, May 26, 2015
  14. 3/4 diff.c: add emit_del_line() and update callers of emit_line_0()Junio C Hamano, May 26, 2015
  15. 4/4 diff.c: --ws-check-deleted optionJunio C Hamano, May 26, 2015
  16. 0/4 showing existing ws breakageJunio C Hamano, May 27, 2015
  17. 1/4 t4015: modernise styleJunio C Hamano, May 27, 2015
  18. 2/4 t4015: separate common setup and per-test expectationJunio C Hamano, May 27, 2015
  19. 3/4 diff.c: add emit_del_line() and emit_context_line()Junio C Hamano, May 27, 2015
  20. 4/4 diff.c: --ws-error-highlight=<kind> optionJunio C Hamano, May 27, 2015
  21. Jeff KingMay 27, 2015
  22. Junio C HamanoMay 27, 2015
  23. Jeff KingMay 27, 2015
  24. Junio C HamanoMay 27, 2015
  25. Jeff KingMay 27, 2015
  26. Junio C HamanoMay 27, 2015
  27. Jeff KingMay 27, 2015
  28. Junio C HamanoMay 26, 2015
  29. Christian BrabandtMay 26, 2015
  30. Junio C HamanoMay 26, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.