diff-apply-buffer: Improve failure message

* lisp/vc/diff-mode.el (diff-apply-buffer): Say "hunk", not
"hunks", when there was only one failed hunk.
This commit is contained in:
Sean Whitton
2024-09-24 16:17:17 +01:00
parent e7260d4eb3
commit ce601de1ca

View File

@@ -2082,7 +2082,8 @@ When applying all hunks was successful, then save the changed buffers."
(save-buffer)))
(message "Saved %d buffers" (length buffer-edits)))
(t
(message "%d hunks failed; no buffers changed" failures)))))
(message "%d %s failed; no buffers changed"
failures (if (> failures 1) "hunks" "hunk"))))))
(defalias 'diff-mouse-goto-source #'diff-goto-source)