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