This started with just refactoring the remove-target (so it matches add-target) but turned into a collection of multiple changes:
make remove-target like add-target (it is a top level command and follows delegations too)
refactor both remove-target and add-target so that the generic parts are in Repository and only git-related parts are in GitRepository
make timestamp a top-level command as well
separate timestamp functionality out of *Repository.snapshot() into it's own method (making sure the obsolete snapshot files are always deleted when they become obsolete)
remove workaround in edit() where some files would be deleted there: now only GitRepository.timestamp() and GitRepository.snapshot() delete files (because only they make files obsolete)
Improve README
Should be noted that while timestamp and snapshot are now separated in the Repository class, the CLI snapshot command still does a timestamp if needed.
This started with just refactoring the remove-target (so it matches add-target) but turned into a collection of multiple changes:
remove-target
likeadd-target
(it is a top level command and follows delegations too)remove-target
andadd-target
so that the generic parts are in Repository and only git-related parts are in GitRepositorytimestamp
a top-level command as well*Repository.snapshot()
into it's own method (making sure the obsolete snapshot files are always deleted when they become obsolete)edit()
where some files would be deleted there: now onlyGitRepository.timestamp()
andGitRepository.snapshot()
delete files (because only they make files obsolete)Should be noted that while timestamp and snapshot are now separated in the Repository class, the CLI
snapshot
command still does a timestamp if needed.Fixes #46, fixes #47, fixes #31