summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 21ba0e8)
raw | patch | inline | side by side (parent: 21ba0e8)
author | Alexandre Julliard <julliard@winehq.org> | |
Mon, 16 Feb 2009 10:40:08 +0000 (11:40 +0100) | ||
committer | Alexandre Julliard <julliard@winehq.org> | |
Sat, 21 Feb 2009 12:49:44 +0000 (13:49 +0100) |
If there's only one file, print its name instead of just "1 file".
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
contrib/emacs/git.el | patch | blob | history |
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index c7d15eb4dce6e7e74b624ee5ff88cf2c40c6e734..eace9c18eb1d17075836694ce664a009f3e02038 100644 (file)
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
(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
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))