浏览 1.0.0 文档
1.0.0 文档修订 2

ait diff

用有界的路径过滤条件,比较当前工作区与当前 Line head。

适用人群: 用户与 coding agent

角色#

在做 Snapshot、修复或恢复的决定之前,用户或 coding agent 都能放心跑。

用途#

ait diff 拿当前工作区跟当前 Line 的头部作比较。它不支持挑任意的 Snapshot 区间;要比不可变的 Snapshot,用 ait snapshot diff

语法#

Code · bash
ait diff
ait diff --stat
ait diff --name-only
ait diff [<path>...]

路径参数是精确的字面过滤,不是 shell 那种通配模式。--stat--name-only 是两种可选的摘要形式。

示例#

Code · bash
ait diff src/LoginForm.tsx

结果会把路径分成已修改、已缺失和未跟踪几类,遇到大文件或二进制内容会 截断,而不是无节制地全打出来。

输出#

普通文本视图重点给出改动的路径和有用的内容。当自动化需要精确的分类时, --json 就是那道机器边界。sprint Markdown 走的是 Plan 沿革,不会作为 代码工作区的内容出现。

失败与恢复#

如果某个本该在的文件不见了,先看 Task 工作区和 Line,别急着还原什么。 更不要为了凑出一个干净的 diff,就覆盖掉不相干的改动。

相关参考#

Version authority

Checked against the exact 1.0.0 source

This page is public documentation, not a second product contract. Use the exact source and distribution contract for release authority.

Owning component Snapshots
  • ait-coreSNP-B06A48DA0245
  • ait-serverSNP-E90456E6425E
  • ait-runnerSNP-6B0A1BB3AFAD
  • ait-pythonSNP-973E3BFAF3DE
  • ait-nodeSNP-F962CC66AA62