Diff a directory and sync changes.
Project description
ddir
ddir
is a command line tool to calculate diffs between two directories and
resolve them.
Check out the diff file format as well.
Usage
Initialize
This will create a directory .ddir
in the source directory where all diffs
will be stored as well as a reference to the destination directory.
ddir init --source <path> --destination <path>
Create diff
This will traverse the source directory, compare it to the destination
directory and store ste diff in .ddir
.
ddir create --source <path>
Resolve diff
This will iterate through all diffs in a given diff file and apply them according to given modes.
ddir resolve --source <path> --file 2022-05-19-806383729.diff --modes xxxxx
Modes to resolve
The modes work like this: for each type (the order is +
, -
, >
, <
, ?
)
a number in the tuple indicates how to handle diffs of that type. There are
the following modes:
- 0: skip
- 1: apply (type dependent, see below)
- 2: choose manually
When choosing to apply diffs, the following will happen:
+
,>
,?
: override destination element with source element<
: override source element with destination element-
: delete destination element
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.