Skip to content

partial diffs vs single global diff #1

@corollari

Description

@corollari

Method 1:

On every new change:

  1. Store the diff between the current tree and the previous one.
  2. Replace the previous tree with the current one.

On restoring:

  1. Walk back the array of stored diffs and apply them back.

Method 2:

On every new change:

  1. Store the diff between the current tree and the one created when start was run

On restoring:

  1. Use the last diff to restore the current tree to its original state (or just replaced the current tree with the original one).
  2. Calculate which change would be the last one applied if the revert was to be carried.
  3. Apply the diff of the selected change to the current directory, so as to bring it forward in time to when the revert has dictated.

Which one is better?

I'm not totally sure which one of the is the fastest one so that should be investigated. So far, I've implemented method 1.

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