Wilfred Hughes
fadd0f22ef
Support Windows-1252 and make UTF-16 detection stricter
...
Fixes #797
2025-01-04 15:48:39 +07:00
Wilfred Hughes
dfcb26c7af
Use tree-sitter-yaml from crates.io
2024-12-21 14:19:40 +07:00
Wilfred Hughes
dda64336e6
Use tree-sitter-make from crates.io
2024-12-21 14:10:07 +07:00
Wilfred Hughes
36607850a2
Roll version
2024-12-20 19:35:47 +07:00
Wilfred Hughes
b3606fc219
Use tree-sitter-xml from crates.io
2024-12-20 09:16:19 +07:00
Wilfred Hughes
cef0b569dd
Use tree-sitter-lua from crates.io
2024-12-20 09:12:16 +07:00
Wilfred Hughes
a6eb339f71
Use tree-sitter-toml from crates.io
2024-12-20 09:07:52 +07:00
Wilfred Hughes
c73b18be77
Use tree-sitter-css from crates.io
2024-12-20 09:00:04 +07:00
Wilfred Hughes
4873e87dac
Use tree-sitter-html from crates.io
2024-12-20 08:55:33 +07:00
Wilfred Hughes
507b60bc45
Use tree-sitter-json from crates.io
2024-12-20 08:49:09 +07:00
Wilfred Hughes
eb0b47d403
Use tree-sitter-php from crates.io
2024-12-20 08:36:36 +07:00
Wilfred Hughes
f9d663ea9f
Use tree-sitter-bash from crates.io
2024-12-20 08:32:54 +07:00
Wilfred Hughes
7e8974e295
Use tree-sitter-go from crates.io
2024-12-20 08:29:30 +07:00
Wilfred Hughes
15b9590db5
Use tree-sitter-julia from crates.io
2024-12-20 08:25:23 +07:00
Wilfred Hughes
d2ed2f6123
Use tree-sitter-java from crates.io
2024-12-20 08:18:17 +07:00
Wilfred Hughes
80f0100c29
Switch to macos-13 runner
2024-12-20 00:16:03 +07:00
Wilfred Hughes
776d978f09
Use tree-sitter-typescript from crates.io
2024-12-20 00:09:12 +07:00
Wilfred Hughes
88731f932d
Use tree-sitter-javascript from crates.io
2024-12-20 00:02:14 +07:00
Wilfred Hughes
db379cf94d
Use tree-sitter-c and tree-sitter-cpp from crates.io
2024-12-19 23:50:23 +07:00
Wilfred Hughes
6ea71e6983
Use tree-sitter-python from crates.io
2024-12-19 23:38:43 +07:00
Wilfred Hughes
2bbed44664
Use tree-sitter-c-sharp from crates.io
2024-12-19 23:21:26 +07:00
Wilfred Hughes
de6e6707d2
Use tree-sitter-ocaml from crates.io
2024-12-19 23:14:12 +07:00
Wilfred Hughes
919f15344f
Use tree-sitter-objc from crates.io
2024-12-19 23:00:43 +07:00
Wilfred Hughes
913aee1c07
Use tree-sitter-scala from crates.io
2024-12-19 22:56:33 +07:00
Wilfred Hughes
b4bf322b13
Update changelog for Ruby parser
2024-12-19 22:52:26 +07:00
Wilfred Hughes
bbe4890cfd
Use tree-sitter-haskell from crates.io
2024-12-19 22:33:28 +07:00
Wilfred Hughes
f68948ffeb
Increase MSRV to 1.74.1
...
This will enable usage of the new tree-sitter-language crate.
2024-12-19 21:25:00 +07:00
Wilfred Hughes
3a1e398edc
Improve handling of named pipe arguments
...
Use display_name in more places, and prefer file names with extensions
when we have two arguments.
Fixes #783
2024-11-15 23:11:25 +07:00
Wilfred Hughes
4df51dc57c
Improve syntax highlighting on tree-sitter lists that are just keywords
...
Closes #777
2024-11-15 00:03:30 +07:00
Wilfred Hughes
549cb483fe
Fix crash due to trailing newlines in string nodes at EOF
...
Fixes #782
2024-11-15 00:03:30 +07:00
Wilfred Hughes
c2e98bb65a
Roll version
2024-10-24 08:17:18 +07:00
Wilfred Hughes
870d1411a0
Link to relevant page in manual
2024-10-23 22:27:01 +07:00
Wilfred Hughes
6a5f5d6f00
Document side-by-side changes
2024-10-23 08:47:28 +07:00
Wilfred Hughes
f58c9e074a
Bump MSRV to 1.66
2024-10-15 23:15:07 +07:00
Wilfred Hughes
7edd2a82cd
Always consider newlines when diffing lines
...
StringIgnoringNewline caused crashes in code that assumed that two
equal values would hav the same string length.
This reverts 86612798ad . A better
approach would be to normalise line endings before diffing, but
additionally print whether files have/lack trailing newlines.
Fixes #755
2024-10-15 08:46:34 +07:00
Wilfred Hughes
393845ddcb
Change recommended git configuration
...
`git-difftool` has strictly less information than `git-diff`.
`git-difftool` therefore produces worse results, and we shouldn't
recommend it.
`git-difftool` does not have file rename information, and sometimes
makes difftastic claim that file permissions have changed (depending
on the permissions of the temporary directory used).
Instead, recommend `git-diff` with an external diff configured, and
update `git-mergetool` instructions to emulate `git-diff` as much as
possible (respecting $MERGED).
Also link to the upstream git bug on segfaults with external diff
tools.
Thanks to @poliorcetics and @gthb for researching this bug and
discussing possible solutions.
Closes #734
Fixes #620
2024-09-22 20:11:36 +07:00
Wilfred Hughes
53477fb46d
0.60 is released
2024-08-06 22:07:58 +07:00
Wilfred Hughes
5a51c02157
Fix crash when the last hunk includes the trailing newline at EOF
...
Input cleaning should happen before we diff the content, not during
display. Previously display would crash due to line numbers
referencing the line that had been stripped.
Fixes #713
Fixes #739
Fixes #742
2024-07-26 08:54:20 +07:00
Wilfred Hughes
c2f4b1f2ee
Update tests and changelog for 1e8be4558b
2024-07-21 11:15:54 +07:00
Wilfred Hughes
92fa3fb3de
Ensure files with no common content are aligned
2024-07-20 23:43:04 +07:00
Wilfred Hughes
fa2ec359d7
Roll version
2024-07-20 16:11:55 +07:00
Wilfred Hughes
ffe27c575e
Ensure line splitting distinguishes "foo" and "foo\n"
...
We rely on being able to split lines and rejoin them to obtain the
original string. `str::lines()` in the Rust stdlib does not have this
property.
This was causing crashes in word-diffing on textual diffing, where
code paths differed on the number of lines they thought a string had.
This was broken in 8b842387a1 .
Fixes #688 .
2024-07-20 16:09:44 +07:00
Wilfred Hughes
a259c858a1
Update F# docs
2024-05-14 10:13:37 +07:00
Wilfred Hughes
d292546df7
Prefer 'device tree' as two words
2024-05-13 16:59:48 +07:00
Wilfred Hughes
de9c84c418
Document new addition
2024-05-13 16:52:33 +07:00
Wilfred Hughes
28d8673371
Treat tree-sitter nodes highlighted as comments as atoms
...
Fixes #711
2024-05-11 22:03:59 +07:00
Wilfred Hughes
835c5eb757
Roll version following release
2024-05-11 13:54:42 +07:00
Wilfred Hughes
0c9277108b
It's not actually a 2x perf win
...
It's more like a 15% reduction in instruction count, which is still
nice.
2024-05-10 16:28:16 +07:00
Wilfred Hughes
edb839c803
Improve terminal width detection
...
Ensure the value is always non-zero, and consider $COLUMNS if
crossterm does not succeed.
Fixes #707
2024-05-10 16:26:48 +07:00
Wilfred Hughes
e23b9fc224
Update CMake parser
2024-04-28 23:53:12 +07:00
Wilfred Hughes
ecaee577b2
Update Elm parser
2024-04-28 23:50:29 +07:00
Wilfred Hughes
ae77a9cdf7
Document C++ parser change
2024-04-28 23:43:58 +07:00
Wilfred Hughes
27fb722ac7
Merge commit '1aafaff4d26dac5a36dd3495be33e1c20161d761'
2024-04-28 23:31:25 +07:00
Wilfred Hughes
cce7b2ee1b
Merge commit 'b466ffb4d7ce0a833754429ad8d3a02e950ed74c'
2024-04-28 23:00:00 +07:00
Wilfred Hughes
a5b2587eaa
Merge commit 'eb68645662a3f7bf7fdd4bcb9531585f54c8570e'
2024-04-28 22:54:18 +07:00
Wilfred Hughes
c2df185d49
Update Lua parser
...
Closes #701
2024-04-28 22:36:23 +07:00
Wilfred Hughes
2e016566ac
Update CSS parser
2024-04-28 21:45:25 +07:00
Wilfred Hughes
38f148df1f
Don't flatten error nodes
...
As of b9d44ae65f (released in 0.38), difftastic prefers a textual
diff if any parse errors are present. As a result, users have to
opt-in to allowing parse errors. We can now preserve structure to
produce diffs that are more granular, at the slight risk of changes
being missed if parsers discard tokens.
Fixes #703
2024-04-28 17:28:34 +07:00
Wilfred Hughes
d15d593708
Move to smallvec for seen vertices
...
This is a surprisingly large perf win. On my Thinkpad:
typing_before/after.ml:
before: 3.038B instructions
after: 2.870B instructions
slow_before/after.rs:
before: 2.381B instructions
after: 1.260B instructions (!)
2024-04-28 16:16:47 +07:00
Wilfred Hughes
d2cdb96e00
Expand man page and add to changelog
2024-04-28 15:07:23 +07:00
Wilfred Hughes
f52ca706f3
Enable --strip-cr by default
...
Line ending differences between input files often leads to confusing
diffs, so remove carriage returns unless explicitly requested.
Fixes #653
Fixes #696
2024-04-09 08:37:41 +07:00
Wilfred Hughes
db281c682c
Roll version
2024-04-02 08:17:24 +07:00
Wilfred Hughes
00e837aeb1
Update changelog
2024-04-01 22:42:16 +07:00
Wilfred Hughes
3be8e80fe7
Fix issue with later lines not having positions during diffing
2024-03-19 00:25:18 +07:00
Wilfred Hughes
34fa3d6eff
Use a blank line after all diff summaries
2024-03-07 08:19:58 +07:00
Wilfred Hughes
c6da85759c
Consider null bytes in text file detection
2024-03-06 23:07:59 +07:00
Wilfred Hughes
d3797ef4e2
Treat Scheme as a lisp in slider logic
2024-03-06 21:56:27 +07:00
Wilfred Hughes
2b19e59aeb
0.56.1 is released
2024-03-05 23:23:43 +07:00
Wilfred Hughes
d9d6401c45
Update ahash to fix aarch64 build on macOS
...
See upstream discussion in
https://github.com/tkaitchuck/aHash/issues/207
2024-03-05 22:12:11 +07:00
Wilfred Hughes
bf8fcab420
0.56 is released
2024-03-05 22:02:37 +07:00
Wilfred Hughes
247727066f
Handle whitespace in shebangs
2024-03-04 22:10:08 +07:00
Wilfred Hughes
d5c60241ef
Detect more Makefile naming patterns
2024-03-04 22:06:09 +07:00
Wilfred Hughes
407ab78cda
Document Scheme addition
2024-03-04 22:03:54 +07:00
Wilfred Hughes
b78f7d447b
Always replace tabs, even in single-column display
...
Fixes #617
2024-03-04 21:38:23 +07:00
Wilfred Hughes
d894a18142
Update perl parser
...
Upstream has made the generated parser.c much smaller too.
2024-03-03 12:40:51 +07:00
Wilfred Hughes
53298e4240
Set a length limit on lines when doing a word diff
...
See #653
2024-02-29 00:54:55 +07:00
Wilfred Hughes
bb9e864ffe
Fix permissions always shown as 'changed' with git-difftool
2024-02-20 00:17:38 +07:00
Wilfred Hughes
cbbcbb3094
Parse file mode properly from git and pass through
2024-02-20 00:07:06 +07:00
Wilfred Hughes
1cc0c42c20
Detect git difftool paths and prefer the second argument
...
Fixes #620
2024-02-19 22:19:20 +07:00
Wilfred Hughes
f99a8ce543
Update changelog for last PR
2024-02-19 12:02:30 +07:00
Wilfred Hughes
6f192d9207
Mention Smali in changelog
2024-02-19 11:59:27 +07:00
Wilfred Hughes
e52849ebba
Merge commit '9fa49ff3315987f715ce5666ff979a7742fa8a98'
2024-02-15 08:54:57 +07:00
Wilfred Hughes
58536b9426
Merge commit '7db8390a16a2cae317f4f4423a7b642cd4cad8c9'
...
Fixes #515
2024-02-13 08:38:53 +07:00
Wilfred Hughes
a721bef7a7
Merge commit '098bd31b7f838a31cce08db4091e989ea42f3ef6'
2024-02-13 08:36:21 +07:00
Wilfred Hughes
77c641748f
0.55 is released
2024-02-01 08:26:52 +07:00
Wilfred Hughes
29b3119f39
Mention #570 in changelog
2024-01-30 21:24:11 +07:00
Wilfred Hughes
052b3a62a3
Use XML file headers as language detection hints
...
Fixes #630
2024-01-30 21:22:51 +07:00
Wilfred Hughes
6760559e6f
Increase MSRV to 1.65
...
See discussion in #570
2024-01-28 12:55:07 +07:00
Wilfred Hughes
73a6a61b27
Add VHDL to changelog
2024-01-28 12:35:11 +07:00
Wilfred Hughes
2d61aefb84
Fix tab replacement in single-column display
...
Fixes #617
2024-01-07 19:35:33 +07:00
Wilfred Hughes
bc0cbaf3ae
Change default tab width to 4
...
This is more consistent with web UIs like GitHub, so I think it's a
better default.
2024-01-07 13:15:12 +07:00
Wilfred Hughes
db86b28a28
Add support for Objective-C
...
Closes #600
Co-authored-by: Nick Moore <nick@pilotmoon.com>
2024-01-07 12:50:19 +07:00
Wilfred Hughes
8eebc24165
Roll version
2024-01-07 00:33:16 +07:00
Wilfred Hughes
7eb2f99077
Update changelog for previous commit
2024-01-05 21:07:46 +07:00
Wilfred Hughes
db0c150f61
Report permission changes
...
Fixes #605
2023-12-30 11:20:00 +07:00
Wilfred Hughes
8b90c95e01
When called with a single path, require conflict markers
...
Fixes #585
2023-12-29 19:39:44 +07:00
Wilfred Hughes
c180fb52a9
Treat strict types in Haskell as atoms
...
This isn't ideal: it prevents a finegrained diff of syntax within a type, but it
beats claiming that the code is unchanged.
Fixes #607
2023-12-28 19:24:35 +07:00
Wilfred Hughes
26c58a25e8
Treat regex literals as atoms in Clojure
2023-12-17 10:46:15 +07:00
Wilfred Hughes
1bed379115
Document salesforce apex in the changelog
2023-12-07 08:56:28 +07:00
Wilfred Hughes
569f0038d1
Always filter blank lines at start and end in positions
...
Fixes #595
2023-11-28 12:35:28 +07:00