aspiers / stow

GNU Stow - mirror of savannah git repository occasionally with more bleeding-edge branches
http://www.gnu.org/s/stow/
GNU General Public License v3.0
589 stars 41 forks source link

Implement the `--orig` command (#4) #88

Open H3mul opened 3 years ago

H3mul commented 3 years ago

Implemented the simple version of the proposal for feature #4.

This should resolve simple file conflicts while stowing by moving them to an .orig copy in the file location and then symlinking the target to the stow.

Added bonus: when using --orig with an unstow, it restores those .orig files back, so stow + unstow should leave the host filesystem untouched. This has no effect on unstow file conflicts.

I didn't need the flexibility of supplying the extension as another arg, or copying the backups to a different dir (as described in a further comment), but I'll be happy to implement if that feature has more demand!

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.2%) to 86.465% when pulling 613599377bc56f2627ab6b1a3040471453082471 on H3mul:feature-4-orig-command into 4ef5eca4a9d107b24e712bb4c2c91f47e7e0fb85 on aspiers:master.

orel1 commented 2 years ago

Thanks for this! It would be really useful to have this ability to ignore conflicts, especially for people like me who manage their dotfiles with stow :-)

however, I would have 2 remarks: