docs: fix two inaccuracies in the borg diff JSON docs, fixes #7486

The "Archive Differencing" section of internals/frontends.rst already
describes the ctime/mtime changes introduced by #7335 (and the --stats
line), so #7486 was in substance done, but the section still had two
claims that do not match the current output:

- the intro only mentioned file contents and user/group/mode as what an
  ItemDiff can be about, although timestamps and the presence of an item
  (added/removed directories, links, devices, fifos) are reported as well.
- the "changes" example claimed two changes for a file whose contents and
  ownership changed, but an ownership change is reported as "changed
  owner" plus "changed user" and/or "changed group", so that gives at
  least three. Use the common contents + mtime + ctime case instead,
  which also matches the example output shown below it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Thomas Waldmann
2026-09-10 00:36:53 +02:00
co-authored by Claude Fable 5.1
parent 7b5741185b
commit 26faf3dd6c
+5 -3
View File
@@ -602,15 +602,17 @@ Example (excerpt) of ``borg list --json-lines``::
Archive Differencing
++++++++++++++++++++
Each archive difference item (file contents, user/group/mode) output by :ref:`borg_diff` is represented by an *ItemDiff* object.
The properties of an *ItemDiff* object are:
Each item that :ref:`borg_diff` reports as different between the two archives (in its file contents, in its
metadata like mode, owner or timestamps, or because it only exists in one of the archives) is represented by
an *ItemDiff* object. The properties of an *ItemDiff* object are:
path:
The filename/path of the *Item* (file, directory, symlink).
changes:
A list of *Change* objects describing the changes made to the item in the two archives. For example,
there will be two changes if the contents of a file are changed, and its ownership are changed.
a file whose contents were modified usually has three changes: the content change itself and the
resulting *mtime* and *ctime* changes (see the example below).
The *Change* object can contain a number of properties depending on the type of change that occurred.
If a 'property' is not required for the type of change, it is not output.