* lisp/vc/vc.el (vc-deduce-fileset-1): Don't call diff-vc-deduce-fileset
for diff-mode when buffer-file-name is non-nil. This is because in this case
a file with a diff might be committed to VCS. So don't use it as a patch
to commit with 'C-x v v'.
(vc-dir-deduce-fileset state-model-only-files))
((derived-mode-p 'dired-mode)
(dired-vc-deduce-fileset state-model-only-files not-state-changing))
- ((derived-mode-p 'diff-mode)
+ ((and (derived-mode-p 'diff-mode) (not buffer-file-name))
(diff-vc-deduce-fileset))
((setq backend (vc-backend buffer-file-name))
(if state-model-only-files