Skip to content

Instantly share code, notes, and snippets.

@ivankelly
Created December 2, 2011 16:01
Show Gist options
  • Save ivankelly/1423751 to your computer and use it in GitHub Desktop.
Save ivankelly/1423751 to your computer and use it in GitHub Desktop.
(defun magit-refresh-diff-buffer (range args)
(let ((magit-current-diff-range (cond
((stringp range)
(cons range 'working))
((null (cdr range))
(cons (car range) 'working))
(t
range))))
(setq magit-current-range range)
(magit-create-buffer-sections
(magit-git-section 'diffbuf
(magit-rev-range-describe range "Changes")
'magit-wash-diffs
"diff"
(magit-diff-U-arg) args))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment