Skip to content

git-filesync 0.22.0

Choose a tag to compare

@stsichler stsichler released this 10 Nov 07:54
· 18 commits to main since this release

Linked directories: add DIR links the directory, pull adds and deletes files

Changes:

  • add URL|SOURCE DIR links the directory as one [dir] entry (base: upstream
    commit and tree). Its files are those of the upstream directory that its
    --include/--exclude patterns select. pull also fetches files new upstream,
    deletes those deleted there and merges adaptations (adaptable); a file
    renamed within the directory takes its adaptations along. No command
    touches files of your own in the directory.
  • status shows a linked directory in one line, with the number of files
    concerned: "adapted: lib/ (1 of 40 files)".
  • A file of a linked directory that is missing is never allowed, as for a
    linked file - unless upstream deleted it too: then pull stages the
    deletion.
  • pull --force keeps a file of this repository that pull would delete
    (adapted here, deleted upstream) or replace (new upstream, in an
    adaptable entry).
  • set --include/--exclude (--no-include/--no-exclude) change the patterns of
    a linked directory, at once; set -p makes it a new link.
  • status, diff, difftool and restore also take files in a linked directory;
    pull, set, rm and unlink take the whole entry; mv moves the directory with
    your own files. Entries must not overlap.

Compatibility:

  • add URL DIR now creates a [dir] entry; the previous behavior (a [file]
    entry for each file) is add --per-file. Existing [file] entries stay
    valid; to switch, unlink them (the files stay), then add the directory.

Documentation:

  • MANUAL: new section "Linked directories"; add, pull, set, rm, mv,
    restore, diff.
  • Pinned example versions in README and MANUAL set to v0.22.0.