vscode-sftp
vscode-sftp copied to clipboard
Warn when uploading over newer file
Is this a similar or duplicate feature request? The same feature request was discussed in the original SFTP extension's repo https://github.com/liximomo/vscode-sftp/issues/215
Is your feature request related to a problem? Please describe. If I have the project downloaded locally, make some changes and save it, the file will automatically upload to the remote without checking if my local file was the same as the remote. This workflow can lead to unexpected overrides if working in a team.
Describe the solution you'd like Warn when uploading over newer files (add diffOnUpload setting in SFTP config). It would function as follows:
- On file save event download matching file from the remote.
- Compare it with the local file before editing started.
- If it isn't different, save the file and upload it.
- If there is a difference, cancel the save and show an alert (e.g "file on the remote is newer" [override anyway] [compare changes]).
- If compare changes is pressed show the diff panel between the local and the remote file.
Describe alternatives you've considered "ftp-kr" extension or "PHPstorm" does this already. With VSCode we could probably achieve this by creating tasks.json.
Does this project help you? I use this extension on daily basis and it eases my workflow a lot. I would love to see this functionality added and believe many others will appreciate it too. Thank you for your consideration.