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

Re: [PATCH 1/4] diff/xdiff: refactor EOF-EOL detection

From
Johannes Sixt <j6t@kdbg.org>
Date
Jun 6, 2010, 09:01 UTC
Message-ID
<201006061101.02156.j6t@kdbg.org>
In-Reply-To
<7vfx10yfmn.fsf@alter.siamese.dyndns.org>
On Sonntag, 6. Juni 2010, Junio C Hamano wrote:
Show 5 quoted lines
> Symlinks are minority among the tracked contents (e.g. in git.git there is
> only one), and they are almost always a single incomplete line.  When they
> change, you do want to notice, and I happen to find it a good visual aid
> to have these incomplete line indicators, in addition to the unusual
> 120000 mode on the index line.
You make whole lot of assumptions, don't you?

A repository cannot have many tracked symlinks? They change infrequently? Additional clues are needed to notice that they change?

Show 5 quoted lines
> Peff uses --textconv to show changes to the exif information on his photo
> collections.  If he has any symlinks, and if he finds that removal of "\No
> newline" is a regression and not an improvement, what recourse does your
> patch give him?  Saying --no-textconv to work around that regression is
> not a solution, isn't it?

Oh, I'm pretty sure that Peff wouldn't use --textconv on his repository if he cared that diffs contained complete reproducible information.

> If you start from a false premise that "\No newline" was an unnecessary
> warning,

That's a strawman. Michael never meant it that way although he said it (unfortunately).

For me, the 120000 mode is visual clue enough (and a very strong visual trigger, BTW) when I browse through a diff. It's appropriate that "\No newline" is suppressed for symbolic links so that it does not distract from the mode line, because "\No newline" is a much strong trigger (that makes alarm bells ring).

-- Hannes
Previous: Junio C HamanoNext: Jeff King
Message 9 of 22 in “Don't warn about missing EOL for symlinks”
  1. 0/4 Don't warn about missing EOL for symlinksMichael J Gruber, Jun 3, 2010
  2. 1/4 diff/xdiff: refactor EOF-EOL detectionMichael J Gruber, Jun 3, 2010
  3. Junio C HamanoJun 3, 2010
  4. Michael J GruberJun 4, 2010
  5. Junio C HamanoJun 5, 2010
  6. Michael J GruberJun 5, 2010
  7. Jeff KingJun 6, 2010
  8. Junio C HamanoJun 6, 2010
  9. Johannes SixtJun 6, 2010
  10. Jeff KingJun 6, 2010
  11. Michael J GruberJun 7, 2010
  12. 2/4 diff: make treatment of missing EOL at EOF configurableMichael J Gruber, Jun 3, 2010
  13. 3/4 diff: Do not warn about missing EOL at EOF for symlinksMichael J Gruber, Jun 3, 2010
  14. Jeff KingJun 3, 2010
  15. 4/4 RFC: add whitespace rule for no-eol-at-eofMichael J Gruber, Jun 3, 2010
  16. Matthieu MoyJun 3, 2010
  17. Michael J GruberJun 3, 2010
  18. Jeff KingJun 3, 2010
  19. Michael J GruberJun 3, 2010
  20. Jeff KingJun 3, 2010
  21. Johannes SixtJun 4, 2010
  22. Jeff KingJun 4, 2010

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.