Since this patch has (AFAICT) not made it in, here is the same thing rewritten into a defadvice than can be dropped into your .emacs;
(defadvice magit-diff (*before* magit-diff-default-to-head *activate*) "Offer HEAD as first default for magit-diff" (interactive (list (magit-read-rev-range "Diff" "HEAD")))) On Wednesday, June 15, 2011 10:55:15 PM UTC-4, George Kadianakis wrote: > > --- > Continuing with another uber-trivial patch; this one uses HEAD as the > default range beginning of magit-diff. It's currently empty which is > unhelpful. I use magit-diff with HEAD a lot and this patch has been > hanging in my local setup for a while and maybe it's useful for > someone else as well. > > magit.el | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/magit.el b/magit.el > index d049fe4..e4f03aa 100644 > --- a/magit.el > +++ b/magit.el > @@ -4570,7 +4570,7 @@ restore the window state that was saved before > ediff was called." > :keymap magit-diff-mode-map) > > (magit-define-command diff (range) > - (interactive (list (magit-read-rev-range "Diff"))) > + (interactive (list (magit-read-rev-range "Diff" "HEAD"))) > (if range > (let* ((dir default-directory) > (args (magit-rev-range-to-git range)) > -- > 1.7.5.3 > > -- --- You received this message because you are subscribed to the Google Groups "magit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
