all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Ed Avis <eda@waniasset.com>
Cc: 20558@debbugs.gnu.org
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	[thread overview]
Message-ID: <56552011.1080209@yandex.ru> (raw)
In-Reply-To: <7E039918541B4C4183BFDB8F015C743032E1FC1E@WCL-EXCH02.wcl.local>

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.






  reply	other threads:[~2015-11-25  2:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 15:13 bug#20558: 24.4; vc-revert on deleted file (git and svn should be more consistent) Ed Avis
2015-11-25  2:42 ` Dmitry Gutov [this message]
2015-11-25 15:38   ` Ed Avis
2015-11-26 15:16     ` Dmitry Gutov
2016-04-08 18:06       ` Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56552011.1080209@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=20558@debbugs.gnu.org \
    --cc=eda@waniasset.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.