phmarek / fsvs

Full System Versioning System
GNU General Public License v3.0
6 stars 3 forks source link

ignore recipes #1

Open scottnotrobot opened 2 years ago

scottnotrobot commented 2 years ago

hi philipp - i've been using fsvs for ages, very happy with it. i was thinking the project might benefit from the ignore lists that i've been accumulating since the beginning. they can take a good bit of time to develop, and should be useful to anybody interested in using fsvs to blanket a system with versioning. i maintain these lists in rsync include/exclude format, which i've found will map to ignore dump format effectively. let me know what you think. if you like the idea, i'll polish up some examples and we can go from there. e.g.:

/root/.bash_history /root/.ssh/known_hosts /root/.ssh/random_seed /root/.ssh/known_hosts2 /root/.mysql_history /root/.viminfo /root/.emacs-places /root/.emacs-places~ /root/.gnupg/random_seed /root/unison.log /root/.gnupg/random_seed /root/.Xauthority /root/.vmware/preferences /root/.vmware/favorites.vmls /root/.rnd /root/.lesshst /root/.csync/csyncstatedb*.db

phmarek commented 2 years ago

Hi,

yeah, thank you, that's a great idea!

Would you please create a pull request (or at least a branch somewhere) that puts the list and an explanation for using it in the doc directory?

Thanks!

scottnotrobot commented 2 years ago

cool i'll work on it this week. right now they are a monolithic file and they should probably be organized a bit. sorry for the delayed reply... i don't have github notifications routed quite right at the moment.

phmarek commented 2 years ago

No need to hurry! Just take your time.

scottnotrobot commented 2 years ago

:) cool i will

but i did look a little this evening.

i'll adjust my language from "ignore recipes" to "common_ignores", which seems a bit more accurate.

one question - i've kept a very small number of comments in my master rsync style ignore files. i've always just stripped these out before mapping them to fsvs-ignore-load format. i do the mapping with a perl one liner. but in our case, i think i should check in the mapped file, as opposed to the rsync file and then asking users to take the extra step of doing the perl one liner map step. so, it would be good instead of stripping all comments, to actually include comments in the mapped file. your documentation says lines can start with # as a comment character. however, when i tried this just now, i get the error:

Expected a shell pattern, starting with "./" or "/"!

a quick glance at the source code and it's not clear to me that this has been implemented. or perhaps it was implemented in the past and has regressed?

scottnotrobot commented 2 years ago

i can see that empty lines are processed without error, but that doesn't help of course...

phmarek commented 2 years ago

One small flag was missing, see 7e71b0826d6ac11e67f730f0fc78c543f4cb5d89...

Thanks for the report!

scottnotrobot commented 2 years ago

fyi i want to get back to this, but been busy times. luckily you said no hurry :) but i at least want to let you know that your comment patch helped, thx!