|
From: | Dmitry Gutov |
Subject: | bug#20558: 24.4; vc-revert on deleted file (git and svn should be more consistent) |
Date: | Wed, 25 Nov 2015 04:42:25 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 |
On 05/12/2015 06:13 PM, Ed Avis wrote:
If the file no longer exists on disk, then I suggest vc-revert should act as follows: - If the buffer is marked as modified, offer to save it, and after saving show diffs and prompt to revert as usual.
I believe we already do that. And if the user says no, the whole operation is aborted.
- If the buffer is not marked as modified, a diff should still be shown between the current buffer contents and what would be fetched from the version control system to replace it.
That sounds a bit inconvenient to implement, and I guess I don't see a lot of benefit.
If that diff is empty, then just go ahead and revert.
That goes against the main use case of vc-revert, as I see it: discarding uncommitted changes if you no longer want them.
Or alternatively, vc-revert should just automatically save-buffer first if the underlying file no longer exists on disk.
That's doable. But then we'll also need to delete it afterwards if the user says no.
[Prev in Thread] | Current Thread | [Next in Thread] |