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

Re: Feature request: git cp

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
Nov 21, 2025, 21:52 UTC
Message-ID
<6D0DEC5C-0912-4D48-A108-3E0D1B2017D7@gmail.com>
In-Reply-To
<CAL4-wQra+7HOJ6_qNy+4_tvz7=KApW7yb7BNE6B86JnowschXg@mail.gmail.com>
Show 5 quoted lines
> My only regret with git is that it's line-based instead of word-based
> as that would see a change from < limit to <= limit as one symbol
> change, allowing semantic analysis of program changes but
> if it's all retrospective anyway, the line-based change analysis
> could gain a word-based mode.

Again, since Git is based on snapshots instead of deltas, actually it doesn't really matter. Git doesn't store diffs (deltas), they are only computed when using `git diff`, `git show` and `git log`. If you want the diff based on words instead of lines, you can use the flag --word-diff in those three commands.

And, again, since Git is based on snapshots, if one wants a more semantic diff, they can use the snapshots of two commits and them generate the diff the way they want. One example of that (and one that I use a lot) is git-latexdiff [1].

[1] https://gitlab.com/git-latexdiff/git-latexdiff
Previous: Martin Guy
Message 10 of 10 in “Feature request: git cp”
  1. Martin GuyNov 20, 2025
  2. Kristoffer HaugsbakkNov 20, 2025
  3. D. Ben KnobleNov 20, 2025
  4. Martin GuyNov 20, 2025
  5. D. Ben KnobleNov 20, 2025
  6. Lucas Seiki OshiroNov 20, 2025
  7. Martin GuyNov 20, 2025
  8. rsbecker@nexbridge.comNov 21, 2025
  9. Martin GuyNov 21, 2025
  10. Lucas Seiki OshiroNov 21, 2025

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.