Skip to content

Commit

Permalink
Mention --check-only in the FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Aug 14, 2023
1 parent eeb2974 commit c6be0bc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ showing one way to use difftastic with magit.
Probably not. Difftastic is young. Consider writing a plugin for your
favourite tool, and I will link it in the README!

### Can I use difftastic to check for syntactic changes without diffing?

Yes. Difftastic can check if the two files have the same AST, without
calculating a diff. This is much faster than normal diffing, and
useful for building tools that check for changes.

For example:

```
$ difft --check-only --exit-code before.js after.js
```

This will set the exit code to 0 if there are no syntactic changes, or
1 if there are changes found.

## Translation

+ [Chinese](./translation/zh-CN/README-zh-CN.md)
Expand Down

0 comments on commit c6be0bc

Please sign in to comment.