summaryrefslogtreecommitdiff
path: root/contrib/emacs
diff options
context:
space:
mode:
authorLibravatar Alexandre Julliard <julliard@winehq.org>2009-02-16 11:40:08 +0100
committerLibravatar Alexandre Julliard <julliard@winehq.org>2009-02-21 13:49:44 +0100
commit5b4e44104ea9f933e461ed7d3ce4a05a00d95dbb (patch)
treec0ce37d03ea3ca0c6e6c110d2b5c7e93406535e7 /contrib/emacs
parentgit.el: Make sure that file lists are sorted as they are created. (diff)
downloadtgif-5b4e44104ea9f933e461ed7d3ce4a05a00d95dbb.tar.xz
git.el: Improve the confirmation message on remove and revert.
If there's only one file, print its name instead of just "1 file". Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Diffstat (limited to 'contrib/emacs')
-rw-r--r--contrib/emacs/git.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index c7d15eb4dc..eace9c18eb 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1068,7 +1068,9 @@ The FILES list must be sorted."
(unless files
(push (file-relative-name (read-file-name "File to remove: " nil nil t)) files))
(if (yes-or-no-p
- (format "Remove %d file%s? " (length files) (if (> (length files) 1) "s" "")))
+ (if (cdr files)
+ (format "Remove %d files? " (length files))
+ (format "Remove %s? " (car files))))
(progn
(dolist (name files)
(ignore-errors
@@ -1087,7 +1089,9 @@ The FILES list must be sorted."
added modified)
(when (and files
(yes-or-no-p
- (format "Revert %d file%s? " (length files) (if (> (length files) 1) "s" ""))))
+ (if (cdr files)
+ (format "Revert %d files? " (length files))
+ (format "Revert %s? " (git-fileinfo->name (car files))))))
(dolist (info files)
(case (git-fileinfo->state info)
('added (push (git-fileinfo->name info) added))