GNU bug report logs -
#20558
24.4; vc-revert on deleted file (git and svn should be more consistent)
Previous Next
Reported by: Ed Avis <eda <at> waniasset.com>
Date: Tue, 12 May 2015 15:15:03 UTC
Severity: normal
Tags: fixed
Found in version 24.4
Fixed in version 25.1
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 20558 <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 9 years and 46 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.