Comments (7)
lojbo .ui
Thanks for the report.
I think the first issue is probably trying to diff lines ending \r\n against files ending with just \n and concluding that they're different.
The second issue is probably due to line diffing trying to highlight words within the same line.
from difftastic.
I can repro the second issue, but not the first. Can you reproduce the first issue with local copies of the files? If so, could you attach them here?
from difftastic.
OK, I can reproduce the first issue if I have two files that differ by line ending, but I'm not convinced that difftastic's behaviour is wrong here.
$ echo "one\ntwo" > a.txt
$ echo "one\nfoo\ntwo" > b.txt
$ unix2dos b.txt
$ difft a.txt b.txt
b.txt --- Text
1 one 1 one
. 2 foo
2 two 3 two
$ diff a.txt b.txt
1,2c1,3
< one
< two
---
> one
> foo
> two
Plain GNU diff also considers these files to be completely different. Do you have any special crlf settings in your Windows git setup?
from difftastic.
I can repro the second issue, but not the first. Can you reproduce the first issue with local copies of the files? If so, could you attach them here?
Unfortunately I'll be away from my computer until next week, sorry. I don't think it's the line endings though? Pretty sure allwords.txt has been CRLF all along. When I get back I'll try adding a test entry to the database and regenerate allwords.txt and see if this still happens.
As for
Do you have any special crlf settings in your Windows git setup?
I don't remember ever messing with that- the one thing I know I've done to etc/config is using difftastic rather than the default diff lol
ni'o lu «lojbo .ui» li'u zo'u .ue xu do jbopre
from difftastic.
The test entry has been made, it happens to mean 'line terminator' lol; I'll rerun the parsing stuff when I can
from difftastic.
Reran the script with the new word.
allwords.txt still printed the entire file:
Replaced every \n
with \r\n
in the script, reran.
This fixed allwords.txt, but data.txt's changes were too big.
Reverted the changes to those two, manually replaced each LF with CRLF, committed, reran.
wheeeeeee
from difftastic.
Updated to 0.56.1, turns out printing such a giant diff is REALLY bad for my terminal lol
from difftastic.
Related Issues (20)
- Parsable output
- Provide automatic display options that consider terminal width, etc.
- Error: "index out of bounds: the len is 20 but the index is 20" HOT 4
- Unchanged HTML reported as changed HOT 1
- No option to diff hidden files in directories HOT 1
- Word differ returns out-of-bounds column numbers HOT 1
- tree-sitter-lua is out-dated
- index out of bounds: the len is X but the index is X', src/display/inline.rs:115:21
- Bad error recovery from (incorrect) C preprocessor error
- Inline diff is ignoring unchanged lines between hunks
- "index out of bounds" error, panic in side_by_side.rs HOT 2
- Crash inside eshell with memory allocation error HOT 5
- Output file paths as relative to current working directory
- Feature Request: Compare Subdirectories, ignore directory name difference
- Elm diff shows no syntactic changes for changes to doc comments
- `--language` command line argument is not supported
- difft does shows single/double quote as a diff for python HOT 3
- Include line number in patch diff header
- difftastic do not show color in fzf preview
- Dynamic sublanguages (injections)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from difftastic.