From 35ea9ab26554971356e22d8ab86916cae334d975 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sun, 15 Feb 2009 20:15:46 +0200 Subject: [PATCH] Improve message when discarding changes in a region. * magit.el (magit-discard-item): Here. --- magit.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/magit.el b/magit.el index 09e2d480..765eb7f1 100644 --- a/magit.el +++ b/magit.el @@ -2640,12 +2640,16 @@ Prefix arg means justify as well." (if (yes-or-no-p "Delete all untracked files and directories? ") (magit-run "git" "clean" "-df"))) ((unstaged diff hunk) - (when (yes-or-no-p "Discard hunk? ") + (when (yes-or-no-p (if (magit-use-region-p) + "Discard changes in region? " + "Discard hunk? ")) (magit-apply-hunk-item-reverse item))) ((staged diff hunk) (if (magit-file-uptodate-p (magit-diff-item-file (magit-hunk-item-diff item))) - (when (yes-or-no-p "Discard hunk? ") + (when (yes-or-no-p (if (magit-use-region-p) + "Discard changes in region? " + "Discard hunk? ")) (magit-apply-hunk-item-reverse item "--index")) (error "Can't discard this hunk. Please unstage it first."))) ((unstaged diff)