Text comparison

Read a text diff without mistaking noise for change

A diff describes how two text sequences differ. It does not decide whether either version is correct, safe, or ready to publish.

Content updated: · Maintained by Hung Chi-Hsueh · corrections

Read a small change before a large document

Compare an original with two lines, version: 1 and status: pending, against version: 1 and status: approved. The unchanged version line supplies context; the removed pending line and added approved line identify the decision to review. A deletion and addition together can represent a replacement, not two separate product changes.

Next add a trailing space to the unchanged line. Toggle Ignore trailing whitespace and record which view you used. This option leaves leading indentation intact. For Python or YAML, still inspect indentation explicitly; a text diff does not validate syntax.

A moved paragraph can appear as removed and added, and two programs with different text can still behave the same. Use the diff to locate a question, then check the surrounding document or run the relevant behavior test. The line comparison does not interpret program semantics.

Read a unified patch without applying it

Unified text patches group changes by file and hunk. A hunk's old and new ranges must agree with its context, removed and added lines. Paths are untrusted labels; viewing them must not write a file or execute a Git command. The local patch reader rejects unsupported binary or combined diffs rather than treating them as ordinary text hunks.

Reading a syntactically consistent patch does not prove it applies to your checkout, passes tests or is safe to merge. Check the intended base, repository status and surrounding behavior in your normal review process. The exported report is for reading, not an authorization to apply it.

Compare one decision at a time

Start with a known original and one changed version. If several edits are mixed together, review each change set separately so the result stays explainable.

Ignore noise deliberately

Trailing whitespace and letter case can hide meaningful changes or create irrelevant noise. Turn an ignore option on only when that exact difference cannot affect the task you are reviewing.

Keep sensitive text local

Use a browser-local comparison for disposable text. Do not paste credentials, production secrets, or private customer data; use your organization’s approved review and storage workflow when collaboration or retention is required.

Example
version: 1
status: pending

Data provenance

Sources