Support for `db-djv-pg` operations under Git control
denis-stepanov opened this issue · 1 comments
denis-stepanov commented
Some db-djv-pg
commands, such as export
or rename
modify the file system. Any serious database snapshot would normally be under version control. Hence, it would be nice that the tool informs Git of the changes made (i.e., stages the change), so that the user would not need to retrofit them manually (which could be a bit tricky, like in the case of rename
). It is suggested to add --git
flag to such commands (not active by default) which would call the relevant Git commands whenever needed.
denis-stepanov commented
Done, with the following remarks:
- instead of
--git
, an autodetect of git repo is implemented, and a reverse option--no-git
provided to inhibit it - only
rename
is currently affected, and it will dogit mv
, edit followed bygit add
.export
will create new unstaged files which corresponds to regular git behavior wrt new files.delete
currently does not support file operations, so no action. Other commands do not modify file system rename
operation will printSTAGED
on successful run indicating that git has been informed of the change