Commit Graph

13250 Commits (c6be0bc16a95319f210820f0e488e5c9e87d5f6b)
 

Author SHA1 Message Date
Wilfred Hughes c6be0bc16a Mention --check-only in the FAQ 2023-08-13 23:08:06 +07:00
Wilfred Hughes eeb2974967 Move option parsing before argument parsing
This is useful for additional mode parsing that wants to access these
options.
2023-08-13 21:34:42 +07:00
Wilfred Hughes 1c60f3efd3 Move content detection out of diff_file_content
This makes the function useful in cases when we already have a string,
not bytes.
2023-08-13 21:31:37 +07:00
Wilfred Hughes 0af76db498 Update regression tests for humansize file formatting 2023-08-13 09:10:16 +07:00
Wilfred Hughes 3c702d0490 Use humansize for file size formatting 2023-08-12 22:34:11 +07:00
Wilfred Hughes d901ac6e9e Silence warning on compiling tree-sitter-go 2023-08-12 11:35:48 +07:00
Wilfred Hughes 5f25bc0ebd Rename information in header should only be shown on first hunk
Fixes #553
2023-08-11 08:21:29 +07:00
Wilfred Hughes f2f9260542 Use the Kotlin parser's built-in highlighting 2023-08-09 00:04:57 +07:00
Wilfred Hughes 56230d1c69 Merge commit '06a2f6e71c7fcac34addcbf2a4667adad1b9c5a7' 2023-08-08 23:39:19 +07:00
Wilfred Hughes 4e77f83dd9 Merge commit '7dc4fb60390218b09bc351062eeede7dcdbb4d9f' 2023-08-08 23:37:28 +07:00
Wilfred Hughes d0cf8c6d0d Merge commit 'e398400a0b785af3cf571f5a57eccab242f0cdf9' 2023-08-08 23:28:07 +07:00
Wilfred Hughes 20760558ff Merge commit '338db38330f0d25cba8e2c6428240ebc5e020264' 2023-08-08 23:26:49 +07:00
Wilfred Hughes 3612c472f5 Merge commit '5f2c94b897601b4029fedcce7db4c6d76ce8a128' 2023-08-08 23:24:52 +07:00
Wilfred Hughes 34d20d6665 Merge commit 'a2861e88a730287a60c11ea9299c033c7d076e30' 2023-08-08 23:24:08 +07:00
Wilfred Hughes 3eb014c0a7 Merge commit 'bbaa67a180cfe0c943e50c55130918be8efb20bd' 2023-08-08 23:22:22 +07:00
Wilfred Hughes db8797d6c2 Merge commit '7aa24fe8616072fc1a659f72d5b60bd8c01fb5cc' 2023-08-08 23:01:48 +07:00
Wilfred Hughes a187d7a134 Improve rename styling
It should use the heading with colour, consistent with other modes,
and the header should come before rename information.
2023-08-08 08:53:33 +07:00
Wilfred Hughes 1e97003da9 Update to latest rayon
This is also a tiny perf win (2.467B instructions to 2.429B
instructions for slow_before.rs).
2023-08-08 08:22:30 +07:00
Wilfred Hughes 4fdc8eebcd Increase MSRV to 1.59 2023-08-07 20:32:08 +07:00
Wilfred Hughes ab1b87eebb Update year in in LICENSE 2023-08-05 22:28:45 +07:00
Wilfred Hughes 2f3f0a875a Add note about how MSRV is chosen 2023-08-05 10:17:58 +07:00
Wilfred Hughes ba92a93f9b Fix rustc warning on recent nightly 2023-08-04 23:31:31 +07:00
Wilfred Hughes 19cbf1d458 Implement some other useful traits on EqOnFirstItem
These aren't immediately used, but they're handy for experimenting
with the similar library which requires these.
2023-08-04 23:29:29 +07:00
Wilfred Hughes 892d4fdb58 Ensure size_hint never exceeds graph_limit
If we have thousands of syntax nodes on both sides, we can end
up attempting to preallocate a very large hashmap.

In #542, a user hit an issue with two JSON files where the LHS had
33,000 syntax nodes and the RHS had 34,000 nodes, so we'd attempt to
preallocate a hashmap of capacity 1,122,000,000. This required
allocating 70,866,960,400 bytes (roughly 66 GiB).

Impose a sensible limit on the hashmap.

Fixes #542
2023-08-04 17:19:27 +07:00
Wilfred Hughes c937f819a1 Log the number of bytes in the arena at the end of route finding 2023-08-04 17:04:23 +07:00
Wilfred Hughes 0c01c73398 Be consistent in lifetime names for Vertex 2023-08-03 08:32:16 +07:00
6cdh 7dc4fb6039 add comment for symbol/number parse 2023-08-03 18:04:41 +07:00
6cdh 47f9148a66 bump version: v0.3.0
* rewrite scanner from C++ to C, thanks @amaanq
* optimize symbol/number parse
2023-08-02 13:37:42 +07:00
6cdh dbfe8096bc feat: optimize symbol/number parse and reduce library size 2023-08-02 13:34:17 +07:00
Wilfred Hughes 757c297412 Adjust header style
Show the hunk count and detected language in a dimmed style. This
information is less important than the diff content itself, so this
change makes the important information more prominent.

First part of #544
2023-07-31 08:35:27 +07:00
Wilfred Hughes 37683db6de Don't fail CI if coverage upload fails
This step sometimes fails, which does not mean our code is bad.
2023-07-29 10:40:32 +07:00
Wilfred Hughes 797af40ae8 Improve Java highlighting 2023-07-27 08:33:38 +07:00
Amaan Qureshi a2861e88a7
Mark helper functions static to avoid compile time conflicts with other scanners (#60) 2023-07-27 09:25:48 +07:00
Wilfred Hughes b2c8cb640f Update crossbeam-channel dependency
0.5.x prior to 0.5.8 have been yanked:
https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-channel/CHANGELOG.md
2023-07-26 20:38:34 +07:00
Wilfred Hughes de0e1f5bda Add test for --ignore-comments option 2023-07-26 20:15:13 +07:00
Wilfred Hughes 448972f8a3 Roll version 2023-07-26 20:02:23 +07:00
Wilfred Hughes d58e3194c8 Move release logic to justfile 2023-07-26 20:01:25 +07:00
FW 06a2f6e71c
Merge pull request #94 from amaanq/fixes
Some scanner fixes
2023-07-27 03:53:13 +07:00
FW f1be302f32
Merge pull request #93 from HerringtonDarkholme/main
feat: support unicode identifier
2023-07-27 03:46:50 +07:00
Amaan Qureshi bae4cdccbf
fix: apply some clang-tidy lints 2023-07-26 20:27:56 +07:00
Amaan Qureshi 4ca44145dd
fix: mark helper functions static 2023-07-26 20:26:21 +07:00
Amaan Qureshi d181a97381
fix: mark `scan` static to avoid naming conflicts with other scanners (#6) 2023-07-27 07:38:44 +07:00
Wilfred Hughes 0cb1cdbb3e Document MSRV for newer bumpalo 2023-07-26 15:12:55 +07:00
Wilfred Hughes 65b235be28 Move to edition 2021 2023-07-26 15:06:21 +07:00
Wilfred Hughes 070dc3b4a5 Update crossterm version
This provides some minor bugfixes for Windows width detection:
https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md

This cherry-picks a525196635, after the
MSRV bump.
2023-07-26 14:56:52 +07:00
Wilfred Hughes b3acf48128 Bump minimum required Rust version to 1.58
Difftastic is generally conservative about MSRV, and will only
increase the version when there is a compelling reason (e.g. major
performance improvement, important bug fix in a dependendency).

This version increase will enable us to upgrade crossterm to 0.26, which
has better detection of terminal width on Windows.

I've also clarified MSRV details for other dependencies that cannot
currently be upgraded.
2023-07-26 11:34:05 +07:00
Wilfred Hughes 721ad0863d Revert "Update crossterm version"
This reverts commit a525196635.

Looks like it doesn't compile on Rust 1.57.
2023-07-26 11:17:50 +07:00
Amaan Qureshi bbaa67a180
0.20.0 2023-07-26 05:48:29 +07:00
Amaan Qureshi 3c35178a65
chore: update CI action 2023-07-26 05:48:29 +07:00
Amaan Qureshi 32ed43a2b5
Merge pull request #126 from amaanq/fixes
Misc. Fixes
2023-07-26 04:58:24 +07:00