Skip to content

Diff includes elements with intermediate changes but no net change: expected? #757

@mattmccutchen

Description

@mattmccutchen

When I request an augmented diff of an element that was changed and then reverted (so the state is the same at the old and new times), I get an <action type="modify"> with identical <old> and <new> content (except for nondeterministic ordering of tags). This is contrary to the wiki, which says, "If an element matches the query both at starting and at the ending time but it is exactly the same at both time (not taking notice of any intermediate change) so this element would not appear among the results." Is this a bug in Overpass, is the wiki just wrong about the design, or am I mistaken in some way?

Here's a minimal example with one node and the history of the node for reference.

My use case was to verify that I had correctly reverted some vandalism by checking that there was no diff between the state before the vandalism and the state after the revert. In that scenario, it's unhelpful to include elements with intermediate changes but no net change in the diff. (As a workaround, I ended up doing separate queries at the two times and doing a textual diff of the outputs, with an extra XSL transform to sort the tags to remove spurious diffs.) However, I could imagine it might be helpful to include the elements if the user wants to retrieve the old and new version metadata with out meta.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions