allanjude / zxfer

A continuation of development on zxfer, a popular script for managing ZFS snapshot replication
BSD 2-Clause "Simplified" License
124 stars 40 forks source link

Code refactor and general cleanup. Potential for new version? #63

Open totalAldo opened 8 months ago

totalAldo commented 8 months ago

Hi Allan,

In adding the compression option, I started to refactor some of the functions in order to make it easier for me to understand and test the changes. In the process, I've renamed variable, grouped functions by rsync/zfs mode, updated verbose messages, and tried to improve the overall readability of the script. Finally, I used a linter and followed its suggestions to update how the conditional tests are written and escaped variables where appropriate. Some unused variables were identified and I've commented those out.

I think these changes would be helpful for future modifications to zxfer and would make a good candidate for a 1.2.0 update. There are too many changes in my fork now to create a standard pull request.

Please share your thoughts/suggestions. Thanks!