Open Dimfred opened 1 year ago
Hmm. I have to think about this one. I have #29 where you then could just add an ignore file to ignore the build folder.
Also could you explain the reason for not having the build folder on the ignore file?
There was none, i just forgot to add it and wiped the remote. I think there could be usecases maybe and just don't have one yet, also it would solve the other problem with the different rsync versions, since everyone could just use their own command.
I think it depends on how you want the plugin to be, completely work out of the box, or make it more configurable. I normally prefer the latter. All power to the user.
Generally I want it to work out of the box but still be easy to extend if needed.
Okay so, I just wiped my whole remote folder, because I set the wrong path, I would really like to disable --delete
on my end. Obviously my error, but still could have been mitigated.
Okay, sure we could add this. But I can tell you the reason why it's there. Say you have a git repo synced up to a remote and I delete a file locally. That file will still exist on the remote side.
If I for example have multiple git branches locally (which adds or removes files) then the remote will be a mess with lots of files not representing the local state.
Don't get me wrong, I see that thats an issue and I think delete makes sense, but e.g. I probably would create myself a custom command for deletions, and run deletions manually, I just want to decide when I do that.
Would be nice to have this, e.g. I sometimes don't want
--delete
to be called, since it would clear my build folder (only if it is not in the.gitignore
) on the remote. I think this could maybe give some more flexibility?What do you think of having a function one can set, that function receives the
project_path
, and thedestination_path
(per command, RsyncUp RsyncDown...) and the user could build his own string and else the default could be provided.I am still looking at the code, but I think that would be a very flexible approach. Love the idea btw if I haven't said it yet, and thank you for writing it <3